diff options
author | Michael McVady <femtonaut@gmail.com> | 2024-01-12 15:17:14 -0600 |
---|---|---|
committer | Michael McVady <femtonaut@gmail.com> | 2024-01-12 15:17:14 -0600 |
commit | 7d9765df281da6ad6debe07b2047affec3ef2e17 (patch) | |
tree | 21fd35283ce1f6538a1129811a6f3a491379c84f /conf | |
parent | f810fe19b8152a32254133680e3d6f506e2277e6 (diff) |
Hack in edit
Diffstat (limited to '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 } |