aboutsummaryrefslogtreecommitdiff
path: root/module/entry-points/server.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/entry-points/server.scm')
-rw-r--r--module/entry-points/server.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index a0afa0f8..0698daf0 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -105,6 +105,18 @@
intervaltype: 'month
))))))
+
+ (POST "/remove" (uid)
+ (unless uid
+ (return (build-response code: 400)
+ "uid required"))
+
+ (aif (get-event-by-uid uid)
+ (begin (remove-event it)
+ (return (build-response code: 204) ""))
+ (return (build-response code: 400)
+ (format #f "No event with UID '~a'" uid))))
+
;; TODO this fails when dtstart is <date>.
(POST "/insert" (cal data)