aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-09-01 15:18:06 +0200
committergrunfink <grunfink@comam.es>2026-09-01 15:18:06 +0200
commit3b19a508d292e52cca82b2c1d157f1018674af1b (patch)
treeeae6e48281ea7c38202449736c4833cde09b2ffc
parent2e4a9a94208d6ecdd4b70aff7d7c7d6dddefdfaa (diff)
New user page /operations.
-rw-r--r--html.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/html.c b/html.c
index 5cbc096..1181644 100644
--- a/html.c
+++ b/html.c
@@ -4874,6 +4874,28 @@ int html_get_handler(const xs_dict *req, const char *q_path,
}
}
else
+ if (strcmp(p_path, "operations") == 0) { /** operations and user settings **/
+ if (!login(&snac, req)) {
+ *body = xs_dup(uid);
+ status = HTTP_STATUS_UNAUTHORIZED;
+ }
+ else {
+ xs_html *h_body = html_user_body(&snac, 0);
+
+ xs_html *html = xs_html_tag("html",
+ html_user_head(&snac, NULL, NULL),
+ h_body);
+
+ xs_html_add(h_body,
+ html_top_controls(&snac),
+ html_footer(&snac));
+
+ *body = xs_html_render_s(html, "<!DOCTYPE html>\n");
+ *b_size = strlen(*body);
+ status = HTTP_STATUS_OK;
+ }
+ }
+ else
if (strcmp(p_path, "admin") == 0) { /** private timeline **/
if (!login(&snac, req)) {
*body = xs_dup(uid);