summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authorGravatar default2023-08-14 11:24:41 +0200
committerGravatar default2023-08-14 11:24:41 +0200
commit86571f37bb3e85acaed6d0212b5543130a6766ce (patch)
tree1b2209d18369e527da3bed75cdb09927476283ad /httpd.c
parentSome work towards an instance timeline. (diff)
downloadpenes-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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/httpd.c b/httpd.c
index 85f098c..cdead11 100644
--- a/httpd.c
+++ b/httpd.c
@@ -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