aboutsummaryrefslogtreecommitdiff
path: root/conf/clog.conf
diff options
context:
space:
mode:
authorMichael McVady <femtonaut@gmail.com>2024-01-16 21:32:22 -0600
committerMichael McVady <femtonaut@gmail.com>2024-01-16 21:32:22 -0600
commit2d92280f0e7e605911da199757fa33d2b5089b0a (patch)
tree49987dc668ea478dfee21310c05feb02261e90f2 /conf/clog.conf
parent7906e579ce5023ec85070b40a3d96bbcaa07d166 (diff)
Support creating new entries
Diffstat (limited to 'conf/clog.conf')
-rw-r--r--conf/clog.conf15
1 files changed, 14 insertions, 1 deletions
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
}