Slon/Api/V1/Notifications: Add initial support for Notifications

This commit is contained in:
Alec Murphy
2025-03-20 09:54:24 -04:00
parent bd8c5009fc
commit 022fceb21b
8 changed files with 123 additions and 3 deletions

View 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);
}
}