aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/calp/server/routes.scm14
-rw-r--r--po/sv.po4
2 files changed, 8 insertions, 10 deletions
diff --git a/module/calp/server/routes.scm b/module/calp/server/routes.scm
index 877bd8f2..925b22b5 100644
--- a/module/calp/server/routes.scm
+++ b/module/calp/server/routes.scm
@@ -124,7 +124,6 @@
(define ical-namespace '(IC . "urn:ietf:params:xml:ns:icalendar-2.0"))
-(define root-script "window.onload = () => document.querySelector('a').click()")
;; TODO ensure encoding on all fields which take user provided data.
;; Possibly a fallback which strips everything unknown, and treats
@@ -132,16 +131,11 @@
(define (make-make-routes)
(make-routes
- ;; Manual redirect to not reserve root.
- ;; Also reason for really ugly frontend redirect.
(GET "/" (html)
- (return `((content-type ,(content-type html)))
- (with-output-to-string
- (lambda ()
- ((sxml->output html)
- (xhtml-doc
- (body (a (@ (href "/today")) ,(G_ "Go to Today"))
- (script ,(lambda () (display root-script))))))))))
+ (return (build-response code: 307
+ headers: `((Location . "/today/")
+ (content-type tex/plain)))
+ (G_ "Redirecting to today, might take some time if server was just restarted.")))
(GET "/favicon.ico" ()
(return
diff --git a/po/sv.po b/po/sv.po
index c447172f..8021951a 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -952,3 +952,7 @@ msgstr "Händelse ~a tillagd till ~a~%"
#, scheme-format
msgid "end (~a) must be equal to or greater than start (~a)"
msgstr "slut (~a) måste vara större en eller lika med start (~a)"
+
+msgid "Redirecting to today, might take some time if server was just "
+ "restarted."
+msgstr "Omdirigerar till idag, kan ta viss tid om servern just startated om."