commit 0c3c79f

default  ·  2024-08-29 05:41:29 +0000 UTC
parent 52e8bfe
The list of pinned posts now works.
1 files changed,  +15, -0
M html.c
M html.c
+15, -0
 1@@ -2910,6 +2910,21 @@ int html_get_handler(const xs_dict *req, const char *q_path,
 2         }
 3     }
 4     else
 5+    if (strcmp(p_path, "list/pinned") == 0) { /** list of pinned posts **/
 6+        if (!login(&snac, req)) {
 7+            *body  = xs_dup(uid);
 8+            status = HTTP_STATUS_UNAUTHORIZED;
 9+        }
10+        else {
11+            xs *list = pinned_list(&snac);
12+
13+            *body = html_timeline(&snac, list, 0, skip, show,
14+                0, L("Pinned posts"), "", 0);
15+            *b_size = strlen(*body);
16+            status  = HTTP_STATUS_OK;
17+        }
18+    }
19+    else
20     if (xs_startswith(p_path, "list/")) { /** list timelines **/
21         if (!login(&snac, req)) {
22             *body  = xs_dup(uid);