working on reauth.
This commit is contained in:
@@ -54,5 +54,24 @@
|
||||
{:status 400
|
||||
:headers {"Content-Type" "application/edn"}
|
||||
:body (pr-str {:message (.getMessage e)
|
||||
:error (.toString e)})})))
|
||||
(POST "/reauthenticate/:id" {:keys [identity] {:keys [id]} :route-params
|
||||
data :edn-params}
|
||||
(assert-admin identity)
|
||||
(try
|
||||
{:status 200
|
||||
:headers {"Content-Type" "application/edn"}
|
||||
:body (pr-str (yodlee/reauthenticate-and-recache
|
||||
(-> (:client-id data)
|
||||
Long/parseLong
|
||||
d-clients/get-by-id
|
||||
:client/code)
|
||||
(Long/parseLong id)
|
||||
(dissoc data :client-id )))}
|
||||
(catch Exception e
|
||||
(log/error e)
|
||||
{:status 500
|
||||
:headers {"Content-Type" "application/edn"}
|
||||
:body (pr-str {:message (.getMessage e)
|
||||
:error (.toString e)})}))))
|
||||
wrap-secure))
|
||||
|
||||
Reference in New Issue
Block a user