mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 19:28:12 +00:00
🐛 Fix bug on body decoding (backend).
This commit is contained in:
parent
ba618eb51d
commit
1af87b9140
@ -21,9 +21,10 @@
|
||||
|
||||
(defn- wrap-parse-request-body
|
||||
[handler]
|
||||
(fn [{:keys [headers body] :as request}]
|
||||
(fn [{:keys [headers body method] :as request}]
|
||||
(let [mtype (get headers "content-type")]
|
||||
(if (= "application/transit+json" mtype)
|
||||
(if (and (= "application/transit+json" mtype)
|
||||
(not= method :get))
|
||||
(try
|
||||
(let [params (t/decode (t/buffer->bytes body))]
|
||||
(handler (assoc request :body-params params)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user