Skip to content

Commit

Permalink
🐛 fix(text.clj): fix text-request? function to return a boolean value
Browse files Browse the repository at this point in the history
  • Loading branch information
ccfontes committed Aug 30, 2023
1 parent 4a9a1ec commit 8c5ba4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions template/bb/lib/ring/middleware/text.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
)

(defn text-request? [request]
(when-let [type (get-in request [:headers "content-type"])]
(seq (re-find #"^text/plain" type))))
(boolean
(when-let [type (get-in request [:headers "content-type"])]
(seq (re-find #"^text/plain" type)))))

(defn wrap-text-body [handler]
(fn [request]
Expand Down

0 comments on commit 8c5ba4a

Please sign in to comment.