fixed issue with yodlee dates.
This commit is contained in:
@@ -140,10 +140,20 @@
|
||||
(let [headers (if token
|
||||
{"Authorization" (str "Token " token)}
|
||||
{})
|
||||
|
||||
method (if (= (get-in query-obj [:venia/operation :operation/type]) :mutation)
|
||||
:post
|
||||
:get)
|
||||
headers (if (= method :post)
|
||||
(assoc headers "Content-Type" "text/plain")
|
||||
headers
|
||||
)
|
||||
query (or query (v/graphql-query (->graphql query-obj)))
|
||||
response (<! (http/request {:method :get
|
||||
response (<! (http/request {:method method
|
||||
:headers headers
|
||||
:url (str "/api/graphql?query=" (js/encodeURIComponent query)
|
||||
|
||||
:body (when = (:post method) query)
|
||||
:url (str "/api/graphql?query=" (when (= :get method) (js/encodeURIComponent query))
|
||||
"&variables=" (pr-str (or variables {})))}))]
|
||||
(if (>= (:status response) 400)
|
||||
(when on-error
|
||||
|
||||
Reference in New Issue
Block a user