diff mrjunejune/admin_api.h @ 264:04fee26ecce0

add authenticated JRPG conversation platform Add reusable auth/session storage, owned conversation recovery, guest quotas, admin workflows, URL-routed conversation UI, mobile frame support, and parallel browser acceptance. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Fri, 07 Aug 2026 07:34:12 -0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mrjunejune/admin_api.h	Fri Aug 07 07:34:12 2026 -0700
@@ -0,0 +1,39 @@
+#ifndef MRJUNEJUNE_ADMIN_API_H
+#define MRJUNEJUNE_ADMIN_API_H
+
+#include "dowa/dowa.h"
+#include "seobeo/seobeo.h"
+
+/* Route paths */
+#define ADMIN_API_PAGE_PATH          "/admin/users"
+#define ADMIN_API_LIST_PATH          "/api/admin/users"
+#define ADMIN_API_PATCH_PATH         "/api/admin/users/:id"
+#define ADMIN_API_REVOKE_SESS_PATH   "/api/admin/users/:id/sessions"
+
+/* Pagination defaults */
+#define ADMIN_API_DEFAULT_LIMIT  50
+#define ADMIN_API_MAX_LIMIT     100
+
+/*
+ * Register all admin routes.  Call after Auth_API_Init.
+ */
+void Admin_API_Register_Routes(void);
+
+#ifdef ADMIN_API_TEST_HOOKS
+/*
+ * Direct handler entry-points for in-process testing.
+ * Only available when ADMIN_API_TEST_HOOKS is defined.
+ */
+Seobeo_Request_Entry *Admin_API_Test_Page_Handler(
+    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
+Seobeo_Request_Entry *Admin_API_Test_List_Handler(
+    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
+Seobeo_Request_Entry *Admin_API_Test_Create_Handler(
+    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
+Seobeo_Request_Entry *Admin_API_Test_Update_Handler(
+    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
+Seobeo_Request_Entry *Admin_API_Test_Revoke_Sessions_Handler(
+    Seobeo_Request_Entry *p_req, Dowa_Arena *p_arena);
+#endif /* ADMIN_API_TEST_HOOKS */
+
+#endif /* MRJUNEJUNE_ADMIN_API_H */