aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-01-14 00:13:49 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-01-14 00:13:49 +0100
commit83981ff008ae59a7f5e62f0d5503f78d781f7f0a (patch)
treeb9d0e3b7c57ccb65761cfaaf14ab22dd6454464e
parentClarify commentary for recurrence tests. (diff)
downloadcalp-83981ff008ae59a7f5e62f0d5503f78d781f7f0a.tar.gz
calp-83981ff008ae59a7f5e62f0d5503f78d781f7f0a.tar.xz
Add horrendous / -> /today redirect.
-rw-r--r--module/calp/server/routes.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/calp/server/routes.scm b/module/calp/server/routes.scm
index 16ab2662..368c7cb0 100644
--- a/module/calp/server/routes.scm
+++ b/module/calp/server/routes.scm
@@ -85,9 +85,13 @@
(make-routes
;; Manual redirect to not reserve root.
+ ;; Also reason for really ugly frontend redirect.
(GET "/" ()
(return '((content-type text/html))
- (sxml->html-string '(a (@ (href "/today")) "Gå till idag"))))
+ (sxml->html-string
+ '(body (a (@ (href "/today")) "Gå till idag")
+ (script "window.onload = function() {
+ document.getElementsByTagName('a')[0].click();}")))))
(GET "/favicon.ico" ()
(return