mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
🐛 Fix bug on body decoding (backend).
This commit is contained in:
parent
ba618eb51d
commit
1af87b9140
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue