add: more debugging

add: more options for testing
This commit is contained in:
Tobias Reisinger 2020-08-14 23:18:22 +02:00
parent 0efbd2a22f
commit e84d54f562
23 changed files with 130 additions and 63 deletions

View file

@ -17,9 +17,10 @@ api_v1_controllers_GET(struct mg_connection *nc, struct http_message *hm, endpoi
cJSON *json = cJSON_CreateArray();
LOGGER_DEBUG("filling json array\n");
for(int i = 0; all_controllers[i] != NULL; ++i)
{
cJSON *json_controller = cJSON_CreateRaw(controller_to_json(all_controllers[i]));
cJSON *json_controller = controller_to_json(all_controllers[i]);
cJSON_AddItemToArray(json, json_controller);
}