aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-04 22:39:13 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-04 22:39:13 +0200
commit72f883d2b5313169a5f0184df35092dee0c23477 (patch)
treec71b91df3f870411a4acfd4b1ae05755628c1f20
parentCatch address already in use for HTTP server. (diff)
downloadcalp-72f883d2b5313169a5f0184df35092dee0c23477.tar.gz
calp-72f883d2b5313169a5f0184df35092dee0c23477.tar.xz
Add link in root to /today.
-rw-r--r--module/entry-points/server.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index 6ab9a2d1..deda98b4 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -63,6 +63,11 @@
(define-method (make-make-routes)
(make-routes
+ ;; Manual redirect to not reserve root.
+ (GET "/" ()
+ (return '((content-type text/html))
+ (sxml->html-string '(a (@ (href "/today")) "Gå till idag"))))
+
(GET "/week/:start-date.html" (start-date)
(let* ((start-date
(start-of-week (parse-iso-date start-date)