mirror of
https://git.checksum.fail/alec/slon.git
synced 2025-12-13 22:49:56 +02:00
Meta: Add files to repository
This commit is contained in:
12
Slon/Api/V2/Filters.HC
Normal file
12
Slon/Api/V2/Filters.HC
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
9
Slon/Api/V2/Instance.HC
Normal file
9
Slon/Api/V2/Instance.HC
Normal file
@@ -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);
|
||||
}
|
||||
12
Slon/Api/V2/Suggestions.HC
Normal file
12
Slon/Api/V2/Suggestions.HC
Normal file
@@ -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