mirror of
https://github.com/yawaflua/SpCloudCore.git
synced 2025-12-08 19:49:28 +02:00
add null checks for delete and update
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user