mirror of
https://github.com/yawaflua/SpCloudCore.git
synced 2025-12-09 20:19:35 +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 user_id = req.get_file_value("UserId").content;
|
||||||
std::string name = req.get_file_value("Name").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); });
|
ranges::transform(name, name.begin(), [](unsigned char c) { return std::tolower(c); });
|
||||||
std::string target = req.get_file_value("Target").content;
|
std::string target = req.get_file_value("Target").content;
|
||||||
std::string authorization_token = req.get_header_value("Authorization");
|
std::string authorization_token = req.get_header_value("Authorization");
|
||||||
|
|||||||
Reference in New Issue
Block a user