add: response macros

add: preparation for more macro endpoints
This commit is contained in:
Tobias Reisinger 2020-09-05 13:29:46 +02:00
parent 9d2c48d645
commit 01ffb1d58d
26 changed files with 482 additions and 353 deletions
src/handlers

View file

@ -82,8 +82,8 @@ handle_http_request(struct mg_connection *nc, struct http_message *hm)
endpoint_t *endpoint = router_find_endpoint(hm->uri.p, hm->uri.len, &hm->method);
endpoint_response_t response;
static const char content[] = "the server did not create a response";
endpoint_response_text(&response, 500, content, STRLEN(content));
M_RESPONSE_TEXT_STATIC(LOGGER_NONE, &response, 500, "server did not create a response");
if(!endpoint)
{