From d319ede2ec62e26c9e755fa26310423e9f062b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 10 Jul 2020 00:15:16 +0200 Subject: Serve xml under .html, month view xhtml content-type. --- module/entry-points/server.scm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm index 398cda6b..6e038526 100644 --- a/module/entry-points/server.scm +++ b/module/entry-points/server.scm @@ -68,14 +68,12 @@ (return '((content-type text/html)) (sxml->html-string '(a (@ (href "/today")) "Gå till idag")))) - (GET "/week/:start-date.:ext" (start-date ext) + (GET "/week/:start-date.html" (start-date) (let* ((start-date (start-of-week (parse-iso-date start-date) (get-config 'week-start)))) - (return `((content-type ,(if (string=? ext "xml") - 'application/xhtml+xml - 'text/html))) + (return `((content-type application/xhtml+xml)) (with-output-to-string (lambda () (html-generate calendars: (getf 'calendars) @@ -91,7 +89,7 @@ (GET "/month/:start-date.html" (start-date) (let* ((start-date (start-of-month (parse-iso-date start-date)))) - (return '((content-type text/html)) + (return '((content-type application/xhtml+xml)) (with-output-to-string (lambda () (html-generate calendars: (getf 'calendars) -- cgit v1.2.3