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