almost there; datomic works for everything except http routes and import.
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
[auto-ap.routes.events :as events]
|
||||
[auto-ap.routes.checks :as checks]
|
||||
[auto-ap.routes.exports :as exports]
|
||||
[auto-ap.db.utils :as u]
|
||||
[buddy.auth.backends.token :refer [jws-backend]]
|
||||
[buddy.auth.middleware :refer [wrap-authentication
|
||||
wrap-authorization]]
|
||||
@@ -48,13 +47,7 @@
|
||||
|
||||
(defn wrap-transaction [handler]
|
||||
(fn [request]
|
||||
(jdbc/with-db-transaction [t (u/get-conn)]
|
||||
(binding [u/current-conn t]
|
||||
(try
|
||||
(handler (assoc request :db-conn t))
|
||||
(catch Exception e
|
||||
(jdbc/db-set-rollback-only! t)
|
||||
(throw e)))))))
|
||||
(handler request)))
|
||||
|
||||
(def app-routes
|
||||
(routes
|
||||
|
||||
Reference in New Issue
Block a user