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.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index 0698daf0..398cda6b 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -68,12 +68,14 @@
(return '((content-type text/html))
(sxml->html-string '(a (@ (href "/today")) "Gå till idag"))))
- (GET "/week/:start-date.html" (start-date)
+ (GET "/week/:start-date.:ext" (start-date ext)
(let* ((start-date
(start-of-week (parse-iso-date start-date)
(get-config 'week-start))))
- (return '((content-type text/html))
+ (return `((content-type ,(if (string=? ext "xml")
+ 'application/xhtml+xml
+ 'text/html)))
(with-output-to-string
(lambda ()
(html-generate calendars: (getf 'calendars)