summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-08-29 07:41:29 +0200
committerdefault <nobody@localhost>2024-08-29 07:41:29 +0200
commit0c3c79f0b9df136c8e676abb8e0a70a829e3b4b5 (patch)
tree5af9b84084dc8934bff62e8cae34ded3bbc733b5 /html.c
parent52e8bfebd0084b0e0cfb90697bab5f62cb7979fe (diff)
The list of pinned posts now works.
Diffstat (limited to 'html.c')
-rw-r--r--html.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/html.c b/html.c
index b04966f..e68e13b 100644
--- a/html.c
+++ b/html.c
@@ -2910,6 +2910,21 @@ int html_get_handler(const xs_dict *req, const char *q_path,
}
}
else
+ if (strcmp(p_path, "list/pinned") == 0) { /** list of pinned posts **/
+ if (!login(&snac, req)) {
+ *body = xs_dup(uid);
+ status = HTTP_STATUS_UNAUTHORIZED;
+ }
+ else {
+ xs *list = pinned_list(&snac);
+
+ *body = html_timeline(&snac, list, 0, skip, show,
+ 0, L("Pinned posts"), "", 0);
+ *b_size = strlen(*body);
+ status = HTTP_STATUS_OK;
+ }
+ }
+ else
if (xs_startswith(p_path, "list/")) { /** list timelines **/
if (!login(&snac, req)) {
*body = xs_dup(uid);