plaid
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
(defn cleanse [e]
|
||||
(-> e
|
||||
(assoc :client/yodlee-provider-accounts (get e :yodlee-provider-account/_client))
|
||||
(assoc :client/plaid-items (get e :plaid-item/_client))
|
||||
(update :client/location-matches
|
||||
(fn [lms]
|
||||
(map #(assoc % :location-match/match (first (:location-match/matches %))) lms)))
|
||||
@@ -23,23 +24,26 @@
|
||||
{:client/address [*]}
|
||||
{:client/bank-accounts [* {:bank-account/type [*]
|
||||
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]
|
||||
:bank-account/plaid-account [:plaid-account/name :db/id :plaid-account/number :plaid-account/balance]
|
||||
:bank-account/intuit-bank-account [:intuit-bank-account/name :intuit-bank-account/external-id :db/id]}
|
||||
]}
|
||||
{:yodlee-provider-account/_client [*]}])
|
||||
{:yodlee-provider-account/_client [*]}
|
||||
{:plaid-item/_client [*]}])
|
||||
:where [?e :client/name]]
|
||||
(d/db (d/connect uri)))
|
||||
(map first)
|
||||
(map cleanse)
|
||||
|
||||
))
|
||||
(map cleanse)))
|
||||
|
||||
(defn get-by-id [id]
|
||||
|
||||
(->>
|
||||
(d/pull (d/db conn )
|
||||
'[* {:client/bank-accounts [* {:bank-account/type [*]
|
||||
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]
|
||||
:bank-account/intuit-bank-account [:intuit-bank-account/name :intuit-bank-account/external-id :db/id]}]}
|
||||
{:yodlee-provider-account/_client [*]}]
|
||||
:bank-account/intuit-bank-account [:intuit-bank-account/name :intuit-bank-account/external-id :db/id]
|
||||
:bank-account/plaid-account [:plaid-account/name :db/id :plaid-account/number :plaid-account/balance]}]}
|
||||
{:yodlee-provider-account/_client [*]}
|
||||
{:plaid-item/_client [*]}]
|
||||
id)
|
||||
(cleanse)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user