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.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index f1a5466d..919dc936 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -120,13 +120,15 @@
headers: `((location . ,location)))
""))
- ;; TODO export all events in interval
(GET "/calendar" (start end)
(return '((content-type text/calendar))
(with-output-to-string
(lambda ()
- (ical-main (parse-iso-date start)
- (parse-iso-date end))))))
+ (if (or start end)
+ (print-events-in-interval
+ (aif start (parse-iso-date it) (current-date))
+ (aif end (parse-iso-date it) (current-date)))
+ (print-all-events))))))
;; TODO this fails if there's a period in the uid.
(GET "/calendar/:uid{.*}.ics" (uid)