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

File diff suppressed because one or more lines are too long

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)

View File

@@ -642,5 +642,3 @@
(partition-all 1000))]
(print ".")
@(dc/transact auto-ap.datomic/conn n)))

View File

@@ -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