handles home page

This commit is contained in:
2025-03-11 20:27:28 -07:00
parent e22beb149e
commit 04ec980b02
4 changed files with 13 additions and 5 deletions

View File

@@ -73,8 +73,17 @@
(defn render-index [_]
(response/resource-response "index.html" {:root "public"}))
(defn home-handler [{:keys [identity]}]
(if identity
{:status 302
:headers {"Location" "/dashboard"}}
{:status 302
:headers {"Location" "/login"}}))
(def match->handler-lookup
(-> {:not-found not-found}
(-> {:not-found not-found
:home home-handler}
(merge ssr/key->handler)
(merge graphql/match->handler)
(merge ezcater/match->handler)