From 99dea51eea23a2c426dd94c48f6c28a49310becb Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 13 Jul 2022 13:22:54 +0200 Subject: [PATCH] :arrow_up: Update yetti to v9.3 (bugfixing) --- backend/deps.edn | 2 +- backend/src/app/http/middleware.clj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/deps.edn b/backend/deps.edn index 77e325ba4..aabbb28a2 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -20,7 +20,7 @@ io.lettuce/lettuce-core {:mvn/version "6.1.8.RELEASE"} java-http-clj/java-http-clj {:mvn/version "0.4.3"} - funcool/yetti {:git/tag "v9.2" :git/sha "4ddcc03" + funcool/yetti {:git/tag "v9.3" :git/sha "c6e2d0d" :git/url "https://github.com/funcool/yetti.git" :exclusions [org.slf4j/slf4j-api]} diff --git a/backend/src/app/http/middleware.clj b/backend/src/app/http/middleware.clj index a6a6057e6..626f5a375 100644 --- a/backend/src/app/http/middleware.clj +++ b/backend/src/app/http/middleware.clj @@ -37,14 +37,14 @@ (let [header (yrq/get-header request "content-type")] (cond (str/starts-with? header "application/transit+json") - (with-open [is (-> request yrq/body yrq/body-stream)] + (with-open [is (yrq/body request)] (let [params (t/read! (t/reader is))] (-> request (assoc :body-params params) (update :params merge params)))) (str/starts-with? header "application/json") - (with-open [is (-> request yrq/body yrq/body-stream)] + (with-open [is (yrq/body request)] (let [params (json/read is)] (-> request (assoc :body-params params)