add: more debugging
add: more options for testing
This commit is contained in:
parent
0efbd2a22f
commit
e84d54f562
23 changed files with 130 additions and 63 deletions
src/endpoints
|
@ -145,7 +145,7 @@ api_v1_schedules_POST(struct mg_connection *nc, struct http_message *hm, endpoin
|
|||
}
|
||||
|
||||
cJSON_Delete(json);
|
||||
json = cJSON_CreateRaw(schedule_to_json(new_schedule));
|
||||
json = schedule_to_json(new_schedule);
|
||||
|
||||
endpoint_response_json(response, 201, json);
|
||||
cJSON_Delete(json);
|
||||
|
@ -165,7 +165,7 @@ api_v1_schedules_GET(struct mg_connection *nc, struct http_message *hm, endpoint
|
|||
|
||||
for(int i = 0; all_schedules[i] != NULL; ++i)
|
||||
{
|
||||
cJSON *json_schedule = cJSON_CreateRaw(schedule_to_json(all_schedules[i]));
|
||||
cJSON *json_schedule = schedule_to_json(all_schedules[i]);
|
||||
|
||||
cJSON_AddItemToArray(json, json_schedule);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue