diff --git a/src/clj/auto_ap/datomic/ledger.clj b/src/clj/auto_ap/datomic/ledger.clj index bf21e269..3f1539f0 100644 --- a/src/clj/auto_ap/datomic/ledger.clj +++ b/src/clj/auto_ap/datomic/ledger.clj @@ -4,10 +4,13 @@ [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 [uri]] + + [clojure.tools.logging :as log] [clj-time.coerce :as c] [clj-time.core :as time])) (defn raw-graphql-ids [db args] + (log/info "ARGS" args) (let [query (cond-> {:query {:find [] :in ['$ ] diff --git a/src/clj/auto_ap/graphql/ledger.clj b/src/clj/auto_ap/graphql/ledger.clj index 3421f84a..f691975c 100644 --- a/src/clj/auto_ap/graphql/ledger.clj +++ b/src/clj/auto_ap/graphql/ledger.clj @@ -22,7 +22,9 @@ (defn get-ledger-page [context args value] (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 (fn [je] (update je :journal-entry/line-items diff --git a/src/clj/auto_ap/yodlee/core.clj b/src/clj/auto_ap/yodlee/core.clj index c1e0faa8..8013ae6a 100644 --- a/src/clj/auto_ap/yodlee/core.clj +++ b/src/clj/auto_ap/yodlee/core.clj @@ -361,14 +361,18 @@ user-session (login-user cob-session) 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)}) - :body (json/write-str data) - :as :json} - other-config))) - log/info) - (refresh-provider-account pa))) + (client/put (merge {:headers (merge base-headers {"Authorization" (auth-header cob-session user-session)}) + :body (json/write-str data) + :as :json} + other-config))) + log/info) + (refresh-provider-account pa) + (catch Exception e + (log/error e))))) #_(defn get-users [] (let [cob-session (login-cobrand)] diff --git a/src/cljs/auto_ap/views/pages/admin/yodlee.cljs b/src/cljs/auto_ap/views/pages/admin/yodlee.cljs index dfd7a10f..0cdeb5af 100644 --- a/src/cljs/auto_ap/views/pages/admin/yodlee.cljs +++ b/src/cljs/auto_ap/views/pages/admin/yodlee.cljs @@ -117,11 +117,11 @@ (re-frame/reg-event-fx ::authenticated - (fn [{:keys [db]} [_ authentication]] + (fn [{:keys [db]} [_ provider-account-id authentication]] {:db (-> db (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 ::save-error @@ -221,7 +221,7 @@ "value" v}) (: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] ]}})) (re-frame/reg-event-fx