add: cache (WIP)
This commit is contained in:
parent
f167f9caec
commit
6d37bd9734
26 changed files with 365 additions and 61 deletions
src/endpoints
|
@ -36,7 +36,7 @@ api_v1_controllers_STR_GET(struct mg_connection *nc, struct http_message *hm, en
|
|||
return;
|
||||
}
|
||||
|
||||
cJSON *json = controller_to_json(controller);
|
||||
cJSON *json = cJSON_CreateRaw(controller_to_json(controller));
|
||||
|
||||
endpoint_response_json(response, 200, json);
|
||||
cJSON_Delete(json);
|
||||
|
@ -140,7 +140,7 @@ api_v1_controllers_STR_PUT(struct mg_connection *nc, struct http_message *hm, en
|
|||
}
|
||||
|
||||
cJSON_Delete(json);
|
||||
json = controller_to_json(controller);
|
||||
json = cJSON_CreateRaw(controller_to_json(controller));
|
||||
|
||||
command_set_controller_name(controller);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue