From 7d9765df281da6ad6debe07b2047affec3ef2e17 Mon Sep 17 00:00:00 2001 From: Michael McVady Date: Fri, 12 Jan 2024 15:17:14 -0600 Subject: Hack in edit --- conf/clog.conf | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'conf') diff --git a/conf/clog.conf b/conf/clog.conf index e787ec3..e305ca4 100644 --- a/conf/clog.conf +++ b/conf/clog.conf @@ -18,7 +18,7 @@ privsep worker { 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 v_example_func +validator v_text function validate_text domain * { attach notls @@ -40,26 +40,20 @@ domain * { methods get } + route ^/entries/[a-z0-9\-]+$ { + handler update_entry + methods post + + validate post id v_uuid + validate post title v_text + validate post body v_text + } + route ^/entries/[a-z0-9\-]+/edit$ { handler edit_entry methods get } - # toy endpoint - # route /form { - # handler get_entry_form - # methods get - # } - - # route /form { - # handler post_entry_form - # methods post - - # validate post id v_uuid - # validate post title v_text - # validate post body v_text - # } - route ^/.*$ { handler redirect } -- cgit v1.2.3