Everywhere: Make session->send() callable
This commit is contained in:
parent
40b3fceab1
commit
c6f74cfa84
26 changed files with 87 additions and 48 deletions
|
@ -5,7 +5,7 @@ U0 @slon_api_v2_filters_get(SlonHttpSession* session)
|
|||
if (@slon_api_authorized(session)) {
|
||||
// SLON_AUTH_ACCOUNT_ID
|
||||
// FIXME: Implement this
|
||||
@slon_http_send_json(session, SLON_EMPTY_JSON_ARRAY);
|
||||
session->send(SLON_EMPTY_JSON_ARRAY);
|
||||
} else {
|
||||
session->status(401);
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ U0 @slon_api_v2_instance_get(SlonHttpSession* session)
|
|||
|
||||
StrPrint(scratch_buffer, "{\"domain\":\"%s\"}", db->o("instance")->@("uri"));
|
||||
@slon_http_set_content_type(session, "application/json; charset=utf-8");
|
||||
@slon_http_send_string(session, scratch_buffer);
|
||||
session->send(scratch_buffer);
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ U0 @slon_api_v2_search_get(SlonHttpSession* session)
|
|||
}
|
||||
|
||||
slon_api_v2_search_get_return:
|
||||
@slon_http_send_json(session, results);
|
||||
session->send(results);
|
||||
Json.Delete(results);
|
||||
} else {
|
||||
session->status(401);
|
||||
|
|
|
@ -5,7 +5,7 @@ U0 @slon_api_v2_suggestions_get(SlonHttpSession* session)
|
|||
if (@slon_api_authorized(session)) {
|
||||
// SLON_AUTH_ACCOUNT_ID
|
||||
// FIXME: Implement this
|
||||
@slon_http_send_json(session, SLON_EMPTY_JSON_ARRAY);
|
||||
session->send(SLON_EMPTY_JSON_ARRAY);
|
||||
} else {
|
||||
session->status(401);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue