diff --git a/SpCloudMain/SpCloudMain.cpp b/SpCloudMain/SpCloudMain.cpp index e7fb38d..cff59cf 100644 --- a/SpCloudMain/SpCloudMain.cpp +++ b/SpCloudMain/SpCloudMain.cpp @@ -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");