almost there; datomic works for everything except http routes and import.

This commit is contained in:
BC
2018-09-20 23:34:57 -07:00
parent 4a237a8224
commit 951f8ceaea
10 changed files with 17 additions and 49 deletions

View File

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