diff options
Diffstat (limited to 'conf/clog.conf')
-rw-r--r-- | conf/clog.conf | 26 |
1 files changed, 10 insertions, 16 deletions
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 } |