diff options
| author | 2024-08-29 07:41:29 +0200 | |
|---|---|---|
| committer | 2024-08-29 07:41:29 +0200 | |
| commit | 0c3c79f0b9df136c8e676abb8e0a70a829e3b4b5 (patch) | |
| tree | 5af9b84084dc8934bff62e8cae34ded3bbc733b5 | |
| parent | Added links to pinned and bookmarked posts as if they were lists. (diff) | |
| download | snac2-0c3c79f0b9df136c8e676abb8e0a70a829e3b4b5.tar.gz snac2-0c3c79f0b9df136c8e676abb8e0a70a829e3b4b5.tar.xz snac2-0c3c79f0b9df136c8e676abb8e0a70a829e3b4b5.zip | |
The list of pinned posts now works.
| -rw-r--r-- | html.c | 15 |
1 files changed, 15 insertions, 0 deletions
| @@ -2910,6 +2910,21 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 2910 | } | 2910 | } |
| 2911 | } | 2911 | } |
| 2912 | else | 2912 | else |
| 2913 | if (strcmp(p_path, "list/pinned") == 0) { /** list of pinned posts **/ | ||
| 2914 | if (!login(&snac, req)) { | ||
| 2915 | *body = xs_dup(uid); | ||
| 2916 | status = HTTP_STATUS_UNAUTHORIZED; | ||
| 2917 | } | ||
| 2918 | else { | ||
| 2919 | xs *list = pinned_list(&snac); | ||
| 2920 | |||
| 2921 | *body = html_timeline(&snac, list, 0, skip, show, | ||
| 2922 | 0, L("Pinned posts"), "", 0); | ||
| 2923 | *b_size = strlen(*body); | ||
| 2924 | status = HTTP_STATUS_OK; | ||
| 2925 | } | ||
| 2926 | } | ||
| 2927 | else | ||
| 2913 | if (xs_startswith(p_path, "list/")) { /** list timelines **/ | 2928 | if (xs_startswith(p_path, "list/")) { /** list timelines **/ |
| 2914 | if (!login(&snac, req)) { | 2929 | if (!login(&snac, req)) { |
| 2915 | *body = xs_dup(uid); | 2930 | *body = xs_dup(uid); |