diff options
author | June McEnroe <june@causal.agency> | 2020-07-09 20:14:27 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-07-09 20:14:27 -0400 |
commit | fb214d0c8096a345f5da30900d9ced0aa777cdc3 (patch) | |
tree | 8458f7beca535e49ed531880b32fefc194d7de8b /contexts.c | |
parent | Add events page stub (diff) | |
download | scooper-fb214d0c8096a345f5da30900d9ced0aa777cdc3.tar.gz scooper-fb214d0c8096a345f5da30900d9ced0aa777cdc3.zip |
Implement very basic events listing
Diffstat (limited to '')
-rw-r--r-- | contexts.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contexts.c b/contexts.c index c75202a..d432cb1 100644 --- a/contexts.c +++ b/contexts.c @@ -29,7 +29,7 @@ const char *ContextsQuery = SQL( ); enum kcgi_err pageContexts(struct kreq *req) { - if (!req->fieldmap[Network]) return httpFail(req, KHTTP_404); + if (!req->fieldmap[Network]) return httpFail(req, KHTTP_400); enum kcgi_err error = httpHead(req, KHTTP_200, KMIME_TEXT_HTML); if (req->method == KMETHOD_HEAD) return error; @@ -59,7 +59,8 @@ enum kcgi_err pageContexts(struct kreq *req) { ); if (!href) err(EX_OSERR, "khttp_urlpart"); - error = khtml_elem(&html, KELEM_LI) + error = 0 + || khtml_elem(&html, KELEM_LI) || khtml_attr(&html, KELEM_A, KATTR_HREF, href, KATTR__MAX) || khtml_puts(&html, context) || khtml_closeelem(&html, 2); |