added ability to see existing accounts.

This commit is contained in:
BC
2018-08-02 21:56:36 -07:00
parent 4ea163b560
commit 0878ccbf20
3 changed files with 98 additions and 35 deletions

View File

@@ -30,5 +30,11 @@
:url (:yodlee-fastlink env)
}) })))
}) }))
(GET "/accounts" {:keys [query-params identity] :as request}
(assert-admin identity)
(let [[session token] (yodlee/get-access-token)]
{:status 200
:headers {"Content-Type" "application/edn"}
:body (pr-str (yodlee/get-accounts)) })))
wrap-secure))

View File

@@ -43,7 +43,9 @@
user-session (login-user cob-session)]
(-> (str (:yodlee-base-url env) "/accounts")
(client/get {:headers (merge base-headers {"Authorization" (auth-header cob-session user-session)})
:as :json}))))
:as :json})
:body
:account)))
(defn get-provider-accounts []
(let [cob-session (login-cobrand)