diff options
| author | 2022-12-04 21:28:29 +0100 | |
|---|---|---|
| committer | 2022-12-06 18:27:33 +0100 | |
| commit | a221237637191d70c2e1d18aec82056501f8140f (patch) | |
| tree | bf6b3d11feca118e81e8521b19c6456ec72ad341 /main.c | |
| parent | Updated TODO. (diff) | |
| download | penes-snac2-a221237637191d70c2e1d18aec82056501f8140f.tar.gz penes-snac2-a221237637191d70c2e1d18aec82056501f8140f.tar.xz penes-snac2-a221237637191d70c2e1d18aec82056501f8140f.zip | |
Pagination of the public and private page
Use the query parameters skip and show to control what you can see,
e.g. /alex/admin?skip=0&show=4
Don't use or save the timeline cache if either is set.
The following functions were changed from accepting a single max
parameter to accepting both skip and show:
timeline_simple_list, timeline_list, index_list_desc.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -159,7 +159,7 @@ int main(int argc, char *argv[]) | |||
| 159 | #endif | 159 | #endif |
| 160 | 160 | ||
| 161 | xs *idx = xs_fmt("%s/private.idx", snac.basedir); | 161 | xs *idx = xs_fmt("%s/private.idx", snac.basedir); |
| 162 | xs *list = index_list_desc(idx, 256); | 162 | xs *list = index_list_desc(idx, 0, 256); |
| 163 | xs *tl = timeline_top_level(list); | 163 | xs *tl = timeline_top_level(list); |
| 164 | 164 | ||
| 165 | xs *j = xs_json_dumps_pp(tl, 4); | 165 | xs *j = xs_json_dumps_pp(tl, 4); |