final reference to old database.
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
[auto-ap.utils :refer [by]]
|
||||
[datomic.api :as d]
|
||||
[auto-ap.datomic :refer [uri remove-nils]]
|
||||
[auto-ap.db.companies :as companies]
|
||||
[clj-time.coerce :as coerce]
|
||||
[digest :refer [sha-256]]
|
||||
[auto-ap.datomic.checks :as d-checks]
|
||||
[auto-ap.datomic.clients :as d-clients]
|
||||
[auto-ap.time :as time]))
|
||||
|
||||
|
||||
@@ -118,14 +118,14 @@
|
||||
_ (println "All accounts:" (client/get-accounts))
|
||||
_ (println "ALL Transactions:" transactions)
|
||||
all-bank-accounts (mapcat (fn [c] (map
|
||||
(fn [{:keys [id yodlee-account-id]}]
|
||||
(fn [{:keys [:db/id :bank-account/yodlee-account-id]}]
|
||||
(when (and id yodlee-account-id)
|
||||
{:bank-account-id id
|
||||
:company-id (:id c)
|
||||
:client-id (:db/id c)
|
||||
:yodlee-account-id yodlee-account-id}))
|
||||
(:bank-accounts c)))
|
||||
(companies/get-all))
|
||||
transaction->company (comp (by :yodlee-account-id :company-id all-bank-accounts) :accountId)
|
||||
(:client/bank-accounts c)))
|
||||
(d-clients/get-all))
|
||||
transaction->company (comp (by :yodlee-account-id :client-id all-bank-accounts) :accountId)
|
||||
transaction->bank-account-id (comp (by :yodlee-account-id :bank-account-id all-bank-accounts) :accountId)]
|
||||
(import-transactions transactions transaction->company transaction->bank-account-id)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user