summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-08-19 09:31:13 +0200
committerdefault <nobody@localhost>2023-08-19 09:31:13 +0200
commit5de1a9ce0cbdda0ded72a51660130327636eb699 (patch)
tree59265f2e9dc5fb8abb43e45a8a23ef3f5dfeaa4e /html.c
parent46cfc37f2bfe03baa4d6feadf7155483c8797459 (diff)
Rewritten history_get() prototype to match static_get().
Diffstat (limited to 'html.c')
-rw-r--r--html.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/html.c b/html.c
index e132f17..19ab6b7 100644
--- a/html.c
+++ b/html.c
@@ -1875,9 +1875,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
if (cache && history_mtime(&snac, h) > timeline_mtime(&snac)) {
snac_debug(&snac, 1, xs_fmt("serving cached local timeline"));
- *body = history_get(&snac, h);
- *b_size = strlen(*body);
- status = 200;
+ status = history_get(&snac, h, body, b_size, NULL, NULL);
}
else {
xs *list = timeline_list(&snac, "public", skip, show);
@@ -1905,9 +1903,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
if (cache && history_mtime(&snac, "timeline.html_") > timeline_mtime(&snac)) {
snac_debug(&snac, 1, xs_fmt("serving cached timeline"));
- *body = history_get(&snac, "timeline.html_");
- *b_size = strlen(*body);
- status = 200;
+ status = history_get(&snac, "timeline.html_", body, b_size, NULL, NULL);
}
else {
snac_debug(&snac, 1, xs_fmt("building timeline"));
@@ -1996,10 +1992,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
status = 404;
}
else
- if ((*body = history_get(&snac, id)) != NULL) {
- *b_size = strlen(*body);
- status = 200;
- }
+ status = history_get(&snac, id, body, b_size, NULL, NULL);
}
}
else