add: cache (WIP)

This commit is contained in:
Tobias Reisinger 2020-08-13 16:29:26 +02:00
parent f167f9caec
commit 6d37bd9734
26 changed files with 365 additions and 61 deletions

View file

@ -37,7 +37,7 @@ api_v1_schedules_STR_GET(struct mg_connection *nc, struct http_message *hm, endp
return;
}
cJSON *json = schedule_to_json(schedule);
cJSON *json = cJSON_CreateRaw(schedule_to_json(schedule));
endpoint_response_json(response, 200, json);
cJSON_Delete(json);
@ -176,7 +176,7 @@ api_v1_schedules_STR_PUT(struct mg_connection *nc, struct http_message *hm, endp
}
cJSON_Delete(json);
json = schedule_to_json(schedule);
json = cJSON_CreateRaw(schedule_to_json(schedule));
endpoint_response_json(response, 200, json);
cJSON_Delete(json);