a bunch of fixes.

This commit is contained in:
Bryce Covert
2020-12-07 17:26:25 -08:00
parent b39df72d2f
commit 65ac96b8a4
4 changed files with 21 additions and 12 deletions

View File

@@ -4,10 +4,13 @@
[auto-ap.utils :refer [dollars-0?]] [auto-ap.utils :refer [dollars-0?]]
[auto-ap.datomic :refer [merge-query apply-sort-3 apply-pagination add-sorter-fields conn]] [auto-ap.datomic :refer [merge-query apply-sort-3 apply-pagination add-sorter-fields conn]]
[auto-ap.datomic :refer [uri]] [auto-ap.datomic :refer [uri]]
[clojure.tools.logging :as log]
[clj-time.coerce :as c] [clj-time.coerce :as c]
[clj-time.core :as time])) [clj-time.core :as time]))
(defn raw-graphql-ids [db args] (defn raw-graphql-ids [db args]
(log/info "ARGS" args)
(let [query (cond-> {:query {:find [] (let [query (cond-> {:query {:find []
:in ['$ ] :in ['$ ]

View File

@@ -22,7 +22,9 @@
(defn get-ledger-page [context args value] (defn get-ledger-page [context args value]
(let [args (assoc args :id (:id context)) (let [args (assoc args :id (:id context))
[journal-entries journal-entries-count] (l/get-graphql (<-graphql (:filters args))) [journal-entries journal-entries-count] (l/get-graphql (assoc (<-graphql (:filters args)
)
:id (:id context)))
journal-entries (mapv journal-entries (mapv
(fn [je] (fn [je]
(update je :journal-entry/line-items (update je :journal-entry/line-items

View File

@@ -361,14 +361,18 @@
user-session (login-user cob-session) user-session (login-user cob-session)
batch-size 100] batch-size 100]
(doto (-> (str (:yodlee-base-url env) "/providerAccounts?providerAccountIds=" pa) (try
(doto (-> (str (:yodlee-base-url env) "/providerAccounts?providerAccountIds=" pa)
(client/put (merge {:headers (merge base-headers {"Authorization" (auth-header cob-session user-session)}) (client/put (merge {:headers (merge base-headers {"Authorization" (auth-header cob-session user-session)})
:body (json/write-str data) :body (json/write-str data)
:as :json} :as :json}
other-config))) other-config)))
log/info) log/info)
(refresh-provider-account pa))) (refresh-provider-account pa)
(catch Exception e
(log/error e)))))
#_(defn get-users [] #_(defn get-users []
(let [cob-session (login-cobrand)] (let [cob-session (login-cobrand)]

View File

@@ -117,11 +117,11 @@
(re-frame/reg-event-fx (re-frame/reg-event-fx
::authenticated ::authenticated
(fn [{:keys [db]} [_ authentication]] (fn [{:keys [db]} [_ provider-account-id authentication]]
{:db (-> db {:db (-> db
(assoc-in [::yodlee :authentication] authentication) (assoc-in [::yodlee :authentication] authentication)
(assoc-in [::yodlee :loading?] false))} (assoc-in [::yodlee :loading?] false)
)) (forms/stop-form [::mfa-form provider-account-id]))}))
(re-frame/reg-event-fx (re-frame/reg-event-fx
::save-error ::save-error
@@ -221,7 +221,7 @@
"value" v}) "value" v})
(:mfa (:data (get-in db [::forms/forms [::mfa-form provider-account-id]]))))} (:mfa (:data (get-in db [::forms/forms [::mfa-form provider-account-id]]))))}
:on-success [::authenticated] :on-success [::authenticated provider-account-id]
:on-error [::forms/save-error [::mfa-form provider-account-id] ]}})) :on-error [::forms/save-error [::mfa-form provider-account-id] ]}}))
(re-frame/reg-event-fx (re-frame/reg-event-fx