From 2d92280f0e7e605911da199757fa33d2b5089b0a Mon Sep 17 00:00:00 2001 From: Michael McVady Date: Tue, 16 Jan 2024 21:32:22 -0600 Subject: Support creating new entries --- conf/clog.conf | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'conf') diff --git a/conf/clog.conf b/conf/clog.conf index 7ddcfd6..0739f70 100644 --- a/conf/clog.conf +++ b/conf/clog.conf @@ -19,6 +19,7 @@ seccomp_tracing no validator v_uuid regex ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ validator v_text function validate_text +# validator v_text regex .* domain * { attach notls @@ -39,6 +40,19 @@ domain * { validate qs:get query v_text } + route /entries/new { + handler get_new_entry_form + methods get + } + + route /entries/ { + handler save_new_entry + methods post + + validate post title v_text + validate post body v_text + } + route ^/entries/[a-z0-9\-]+$ { handler get_entry methods get @@ -53,7 +67,6 @@ domain * { handler update_entry methods post - validate post id v_uuid validate post title v_text validate post body v_text } -- cgit v1.2.3