mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-14 17:45:04 +00:00
The list of pinned posts now works.
This commit is contained in:
parent
52e8bfebd0
commit
0c3c79f0b9
1 changed files with 15 additions and 0 deletions
15
html.c
15
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);
|
||||
|
|
Loading…
Reference in a new issue