handles home page
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user