Fix config handling

This commit is contained in:
Tobias Reisinger 2020-11-12 21:58:01 +01:00
parent fad3d80f39
commit fca35ade9e
18 changed files with 125 additions and 139 deletions
src/endpoints

View file

@ -23,6 +23,8 @@ api_v1_schedules_POST(struct mg_connection *nc, struct http_message *hm, endpoin
cJSON *json_name = cJSON_GetObjectItemCaseSensitive(json, "name");
if(!cJSON_IsString(json_name) || (json_name->valuestring == NULL))
{
cJSON_Delete(json);
M_RESPONSE_400_NO_NAME(response);
return;
}