automated imports.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
[auto-ap.routes.reminders :as reminders]
|
||||
[auto-ap.routes.graphql :as graphql]
|
||||
[auto-ap.routes.vendors :as vendors]
|
||||
[auto-ap.routes.events :as events]
|
||||
[auto-ap.routes.checks :as checks]
|
||||
[auto-ap.db.utils :as u]
|
||||
[buddy.auth.backends.token :refer [jws-backend]]
|
||||
@@ -41,11 +42,6 @@
|
||||
|
||||
(def auth-backend (jws-backend {:secret (:jwt-secret env) :options {:alg :hs512}}))
|
||||
|
||||
(def app-routes
|
||||
(routes
|
||||
api-routes
|
||||
static-routes))
|
||||
|
||||
(defn wrap-transaction [handler]
|
||||
(fn [request]
|
||||
(jdbc/with-db-transaction [t (u/get-conn)]
|
||||
@@ -56,9 +52,18 @@
|
||||
(jdbc/db-set-rollback-only! t)
|
||||
(throw e)))))))
|
||||
|
||||
(def app-routes
|
||||
(routes
|
||||
(wrap-transaction api-routes)
|
||||
(context "/api" [] events/routes)
|
||||
|
||||
|
||||
static-routes))
|
||||
|
||||
|
||||
|
||||
(def app
|
||||
(-> #'app-routes
|
||||
(wrap-transaction)
|
||||
(wrap-authorization auth-backend)
|
||||
(wrap-authentication auth-backend)
|
||||
(wrap-reload)
|
||||
|
||||
Reference in New Issue
Block a user