summary refs log tree commit diff
path: root/contexts.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-09 20:14:27 -0400
committerJune McEnroe <june@causal.agency>2020-07-09 20:14:27 -0400
commitfb214d0c8096a345f5da30900d9ced0aa777cdc3 (patch)
tree8458f7beca535e49ed531880b32fefc194d7de8b /contexts.c
parentAdd events page stub (diff)
downloadscooper-fb214d0c8096a345f5da30900d9ced0aa777cdc3.tar.gz
scooper-fb214d0c8096a345f5da30900d9ced0aa777cdc3.zip
Implement very basic events listing
Diffstat (limited to 'contexts.c')
-rw-r--r--contexts.c5
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);
/> 2018-11-13Fix spacing after parenthetical sentencesJune McEnroe 2018-11-13Add gzungetc.3June McEnroe 2018-11-13Add gzgetc.3June McEnroe 2018-11-13Add gzputc.3June McEnroe 2018-11-13Add gzgets.3June McEnroe 2018-11-13Add gzputs.3June McEnroe 2018-11-13Add gzprintf.3June McEnroe 2018-11-13Add gzfwrite.3June McEnroe 2018-11-13Add gzwrite.3June McEnroe 2018-11-12Add gzfread.3June McEnroe 2018-11-12Add gzread.3June McEnroe 2018-11-12Add gzsetparams.3June McEnroe 2018-11-12Add gzbuffer.3June McEnroe 2018-11-12Add gzdopen to gzopen.3June McEnroe 2018-11-12Add gzopen.3June McEnroe 2018-11-12Add inflateBackEnd.3June McEnroe 2018-11-12Add inflateBack.3June McEnroe 2018-11-12Add inflateBackInit.3June McEnroe 2018-11-11Add inflateGetHeader.3June McEnroe 2018-11-11Add inflateMark.3June McEnroe 2018-11-11Add inflatePrime.3June McEnroe 2018-11-11Add inflateReset.3June McEnroe 2018-11-11Add inflateCopy.3June McEnroe 2018-11-11Add inflateSync.3June McEnroe 2018-11-11Add inflateGetDictionary.3June McEnroe 2018-11-11Add inflateSetDictionary.3June McEnroe 2018-11-11Add inflateInit2.3June McEnroe