diff --git a/SpCloudMain/SpCloudMain.cpp b/SpCloudMain/SpCloudMain.cpp index cff59cf..8b93843 100644 --- a/SpCloudMain/SpCloudMain.cpp +++ b/SpCloudMain/SpCloudMain.cpp @@ -102,6 +102,13 @@ int main() std::string name = req.get_file_value("Name").content; + if (name.empty() || name == " ") + { + res.set_content("Select another app name", "text/plain"); + + return; + } + std::string authorization_token = req.get_header_value("Authorization"); string is_user_banned = mongo_service.is_user_banned(authorization_token); @@ -139,6 +146,13 @@ int main() std::string name = req.get_file_value("Name").content; + if (name.empty() || name == " ") + { + res.set_content("Select another app name", "text/plain"); + + return; + } + std::string authorization_token = req.get_header_value("Authorization"); string is_user_banned = mongo_service.is_user_banned(authorization_token);