commit d1a0945108cc832039b3ec4439075294a5116197
parent 93dde76ed814d0c6b530a002fbecb6ad5772284a
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Wed, 20 Mar 2024 20:36:18 -0700
Check tk_startpage errors in the archive page
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pages/archive.c b/pages/archive.c
@@ -83,11 +83,12 @@ pagearchive(struct pagedata *pd)
enum kcgi_err status;
struct timesheet *times, *firsttimes;
- tk_startpage(pd, &template, KHTTP_200);
-
if (!pd->user)
errorpage(pd, KHTTP_401);
+ if ((status = tk_startpage(pd, &template, KHTTP_200)) != KCGI_OK)
+ return status;
+
if (gettimes(pd, pd->user->hash, -1, ×))
return KCGI_SYSTEM;