aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-26 22:11:40 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-26 22:11:40 +0200
commit84ab8c5b1b713b5c27e666e70658e0494e58080f (patch)
treee6ab3277316f21a365d4857d723ebba9dafae02f
parentRemove use-modules*. (diff)
downloadcalp-84ab8c5b1b713b5c27e666e70658e0494e58080f.tar.gz
calp-84ab8c5b1b713b5c27e666e70658e0494e58080f.tar.xz
Export ICS interval.
-rw-r--r--TODO3
-rw-r--r--module/entry-points/server.scm13
2 files changed, 8 insertions, 8 deletions
diff --git a/TODO b/TODO
index 954cf822..dcf39143 100644
--- a/TODO
+++ b/TODO
@@ -41,9 +41,6 @@ Handle systems with bad `cal' programs
HTML
====
-Exportera som ICS-knapp!
-------------------------
-
Icke-linjär tidsskala
---------------------
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index 46277339..408b00b3 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -92,11 +92,14 @@
;; TODO export all events in interval
(GET "/calendar" (start end)
- (ical-main calendar
- regular
- repeating
- (parse-iso-date start)
- (parse-iso-date end)))
+ (return '((content-type text/calendar))
+ (with-output-to-string
+ (lambda ()
+ (ical-main calendar
+ regular
+ repeating
+ (parse-iso-date start)
+ (parse-iso-date end))))))
;; TODO this returns "invalid" events, since the surrounding VCALENDAR is missing.
(GET "/calendar/:uid.ics" (uid)