mirror of
https://git.checksum.fail/alec/slon.git
synced 2026-06-16 10:59:40 +03:00
Meta: Add files to repository
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
U0 @slon_api_v2_filters_get(SlonHttpSession* session)
|
||||
{
|
||||
// SLON_SCRATCH_BUFFER_AND_REQUEST_JSON
|
||||
|
||||
if (@slon_api_authorized(session)) {
|
||||
// SLON_AUTH_ACCOUNT_ID
|
||||
// FIXME: Implement this
|
||||
@slon_http_send_json(session, SLON_EMPTY_JSON_ARRAY);
|
||||
} else {
|
||||
@slon_http_set_status_code(session, 401);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
U0 @slon_api_v2_instance_get(SlonHttpSession* session)
|
||||
{
|
||||
SLON_SCRATCH_BUFFER_AND_REQUEST_JSON
|
||||
no_warn request_json;
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
U0 @slon_api_v2_suggestions_get(SlonHttpSession* session)
|
||||
{
|
||||
// SLON_SCRATCH_BUFFER_AND_REQUEST_JSON
|
||||
|
||||
if (@slon_api_authorized(session)) {
|
||||
// SLON_AUTH_ACCOUNT_ID
|
||||
// FIXME: Implement this
|
||||
@slon_http_send_json(session, SLON_EMPTY_JSON_ARRAY);
|
||||
} else {
|
||||
@slon_http_set_status_code(session, 401);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user