diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-10 00:15:16 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-10 00:15:16 +0200 |
commit | d319ede2ec62e26c9e755fa26310423e9f062b93 (patch) | |
tree | c369fe5e34ab95969a7669cff6bc984317bfea2e | |
parent | Add CSS to embedded icalendar. (diff) | |
download | calp-d319ede2ec62e26c9e755fa26310423e9f062b93.tar.gz calp-d319ede2ec62e26c9e755fa26310423e9f062b93.tar.xz |
Serve xml under .html, month view xhtml content-type.
Diffstat (limited to '')
-rw-r--r-- | module/entry-points/server.scm | 8 |
1 files 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) |