From 86571f37bb3e85acaed6d0212b5543130a6766ce Mon Sep 17 00:00:00 2001 From: default Date: Mon, 14 Aug 2023 11:24:41 +0200 Subject: The instance URL can now show a timeline. --- httpd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'httpd.c') 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, /* is it the server root? */ if (*q_path == '\0') { - if ((*body = greeting_html()) != NULL) + if (xs_type(xs_dict_get(srv_config, "show_instance_timeline")) == XSTYPE_TRUE) { + xs *tl = timeline_instance_list(0, 30); + *body = html_timeline(NULL, tl, 0, 0, 0, 0); + } + else + *body = greeting_html(); + + if (*body) status = 200; } else -- cgit v1.2.3