add: cache (WIP)
This commit is contained in:
parent
f167f9caec
commit
6d37bd9734
26 changed files with 365 additions and 61 deletions
src/endpoints
|
@ -145,7 +145,7 @@ api_v1_schedules_POST(struct mg_connection *nc, struct http_message *hm, endpoin
|
|||
}
|
||||
|
||||
cJSON_Delete(json);
|
||||
json = schedule_to_json(new_schedule);
|
||||
json = cJSON_CreateRaw(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 = schedule_to_json(all_schedules[i]);
|
||||
cJSON *json_schedule = cJSON_CreateRaw(schedule_to_json(all_schedules[i]));
|
||||
|
||||
cJSON_AddItemToArray(json, json_schedule);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue