mirror of
https://git.checksum.fail/alec/slon.git
synced 2025-12-08 20:19:56 +02:00
Slon/Api/V1/Notifications: Add initial support for Notifications
This commit is contained in:
16
Slon/Api/V2/Notifications.HC
Normal file
16
Slon/Api/V2/Notifications.HC
Normal file
@@ -0,0 +1,16 @@
|
||||
U0 @slon_api_v2_notifications_get(SlonHttpSession* session)
|
||||
{
|
||||
// SLON_SCRATCH_BUFFER_AND_REQUEST_JSON
|
||||
|
||||
if (@slon_api_authorized(session)) {
|
||||
// SLON_AUTH_ACCOUNT_ID
|
||||
// FIXME: Implement this
|
||||
if (String.EndsWith("policy", session->path())) {
|
||||
session->send(SLON_EMPTY_JSON_OBJECT);
|
||||
} else {
|
||||
session->send(SLON_EMPTY_JSON_ARRAY);
|
||||
}
|
||||
} else {
|
||||
session->status(401);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user