add: file sending capability

This commit is contained in:
Tobias Reisinger 2020-05-31 02:07:25 +02:00
parent 6178ef3c7b
commit 760cec9a20
18 changed files with 79 additions and 53 deletions

View file

@ -8,9 +8,10 @@
#include <models/tag.h>
void
api_v1_schedules_POST(struct http_message *hm, endpoint_args_t *args, endpoint_response_t *response)
api_v1_schedules_POST(struct mg_connection *nc, struct http_message *hm, endpoint_args_t *args, endpoint_response_t *response)
{
(void)args;
(void)nc;
cJSON *json = cJSON_ParseWithLength(hm->body.p, hm->body.len);
if(json == NULL)
@ -133,10 +134,12 @@ api_v1_schedules_POST(struct http_message *hm, endpoint_args_t *args, endpoint_r
}
void
api_v1_schedules_GET(struct http_message *hm, endpoint_args_t *args, endpoint_response_t *response)
api_v1_schedules_GET(struct mg_connection *nc, struct http_message *hm, endpoint_args_t *args, endpoint_response_t *response)
{
(void)args;
(void)hm;
(void)nc;
schedule_t** all_schedules = schedule_get_all();
cJSON *json = cJSON_CreateArray();