diff options
| author | 2023-08-14 11:24:41 +0200 | |
|---|---|---|
| committer | 2023-08-14 11:24:41 +0200 | |
| commit | 86571f37bb3e85acaed6d0212b5543130a6766ce (patch) | |
| tree | 1b2209d18369e527da3bed75cdb09927476283ad /httpd.c | |
| parent | Some work towards an instance timeline. (diff) | |
| download | penes-snac2-86571f37bb3e85acaed6d0212b5543130a6766ce.tar.gz penes-snac2-86571f37bb3e85acaed6d0212b5543130a6766ce.tar.xz penes-snac2-86571f37bb3e85acaed6d0212b5543130a6766ce.zip | |
The instance URL can now show a timeline.
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 9 |
1 files changed, 8 insertions, 1 deletions
| @@ -114,7 +114,14 @@ int server_get_handler(xs_dict *req, const char *q_path, | |||
| 114 | 114 | ||
| 115 | /* is it the server root? */ | 115 | /* is it the server root? */ |
| 116 | if (*q_path == '\0') { | 116 | if (*q_path == '\0') { |
| 117 | if ((*body = greeting_html()) != NULL) | 117 | if (xs_type(xs_dict_get(srv_config, "show_instance_timeline")) == XSTYPE_TRUE) { |
| 118 | xs *tl = timeline_instance_list(0, 30); | ||
| 119 | *body = html_timeline(NULL, tl, 0, 0, 0, 0); | ||
| 120 | } | ||
| 121 | else | ||
| 122 | *body = greeting_html(); | ||
| 123 | |||
| 124 | if (*body) | ||
| 118 | status = 200; | 125 | status = 200; |
| 119 | } | 126 | } |
| 120 | else | 127 | else |