aboutsummaryrefslogtreecommitdiff
path: root/haunt/api.scm
diff options
context:
space:
mode:
Diffstat (limited to 'haunt/api.scm')
-rw-r--r--haunt/api.scm16
1 files changed, 10 insertions, 6 deletions
diff --git a/haunt/api.scm b/haunt/api.scm
index e9c5642..5b5fa2b 100644
--- a/haunt/api.scm
+++ b/haunt/api.scm
@@ -15,6 +15,8 @@
;;; <http://www.gnu.org/licenses/>.
(use-modules (ice-9 match)
+ (jakob dynamic capabilities comment-form)
+ (jakob dynamic capabilities comments)
(jakob dynamic capabilities gallery)
(jakob dynamic capabilities rsvp)
(jakob dynamic logging)
@@ -37,13 +39,14 @@
(args (uri-query (request-uri request))))
(log-append! 'info (format #f "~a ~a (~a) (~a)" method endpoint args originating-ip)))
((match (cons (request-method request) endpoint)
+ (('GET "comment-form" _) get-comment-form)
;; ('(GET "challenge") make-challenge)
;; ('(GET "comments") get-comments)
- ;; ('(POST "comment") put-comment)
- ('(GET "gallery") get-gallery)
- ('(GET "gallery" "image") get-image)
- ('(GET "rsvp" "event-info") get-event-info)
- ('(POST "rsvp") post-event-rsvp)
+ (('POST "comment") put-comment)
+ (('GET "gallery") get-gallery)
+ (('GET "gallery" "image") get-image)
+ (('GET "rsvp" "event-info") get-event-info)
+ (('POST "rsvp") post-event-rsvp)
(_ (lambda (. args) (not-found request))))
request body))
@@ -71,4 +74,5 @@
(not-found request)))
(values (wrap-response response) resp-body)))
-(run-server main-request-handler)
+;; (run-server main-request-handler)
+(run-server main-request-handler 'http '(#:port 8081))

© 2015 - 2026 Jakob L. Kreuze