summaryrefslogtreecommitdiff
path: root/haunt/jakob/dynamic/capabilities/comment-form.scm
diff options
context:
space:
mode:
Diffstat (limited to 'haunt/jakob/dynamic/capabilities/comment-form.scm')
-rw-r--r--haunt/jakob/dynamic/capabilities/comment-form.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/haunt/jakob/dynamic/capabilities/comment-form.scm b/haunt/jakob/dynamic/capabilities/comment-form.scm
index f1cbd9e..6937d15 100644
--- a/haunt/jakob/dynamic/capabilities/comment-form.scm
+++ b/haunt/jakob/dynamic/capabilities/comment-form.scm
@@ -18,6 +18,7 @@
#:use-module (gcrypt base64)
#:use-module (haunt html)
#:use-module (ice-9 match)
+ #:use-module (jakob builder blog)
#:use-module (jakob dynamic captcha)
#:use-module (jakob dynamic util)
#:use-module (jakob theme)
@@ -28,7 +29,10 @@
#:use-module (web request)
#:use-module (web response)
#:use-module (web uri)
- #:export (get-comment-form))
+ #:export (render-comment-form-success
+ render-comment-form-failure
+
+ get-comment-form))
(define (render-comment-form slug)
(let-values (((captcha-id captcha-image) (new-captcha!)))
@@ -64,6 +68,11 @@
(input (@ (type "submit") (id "submit-form") (value "Submit")))))
,(script "proof-of-work.js")))))
+(define (render-comment-form-success slug)
+ `((div (h1 "Success!")
+ (meta (@ (http-equiv "refresh")
+ (content "1; url=https://jakob.space"))))))
+
(define (get-comment-form request body)
"API endpoint handler for querying for the comments on a particular post