handles home page
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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)
|
||||
|
||||
@@ -642,5 +642,3 @@
|
||||
(partition-all 1000))]
|
||||
(print ".")
|
||||
@(dc/transact auto-ap.datomic/conn n)))
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
[auto-ap.routes.admin.sales-summaries :as ss-routes]
|
||||
[auto-ap.routes.admin.transaction-rules :as tr-routes]))
|
||||
|
||||
(def routes {"impersonate" :impersonate
|
||||
(def routes {"" :home
|
||||
"impersonate" :impersonate
|
||||
"logout" :logout
|
||||
"login" :login
|
||||
"search" :search
|
||||
|
||||
Reference in New Issue
Block a user