mirror of
https://github.com/yawaflua/SpCloudCore.git
synced 2025-12-08 19:49:28 +02:00
Add if (name.empty() || name == " ") check for publish layer
This commit is contained in:
@@ -50,6 +50,13 @@ int main()
|
||||
|
||||
std::string user_id = req.get_file_value("UserId").content;
|
||||
std::string name = req.get_file_value("Name").content;
|
||||
if (name.empty() || name == " ")
|
||||
{
|
||||
res.set_content("Select another app name", "text/plain");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ranges::transform(name, name.begin(), [](unsigned char c) { return std::tolower(c); });
|
||||
std::string target = req.get_file_value("Target").content;
|
||||
std::string authorization_token = req.get_header_value("Authorization");
|
||||
|
||||
Reference in New Issue
Block a user