coercion/coerce! can be used now

This commit is contained in:
Tommi Reiman 2018-07-17 12:41:29 +03:00
parent 4bbc1564ae
commit 5ded652147

View file

@ -23,12 +23,9 @@
(let [q (query-params uri)
;; Return uncoerced values if coercion is not enabled - so
;; that tha parameters are always accessible from same property.
;; FIXME: coerce! can't be used as it doesn't take query-params
parameters (if (:result match)
(coercion/coerce-request (:result match) {:query-params q
:path-params (:path-params match)})
{:query q
:path (:path-params match)})]
parameters (or (coercion/coerce! (assoc match :query-params q))
{:path (:path-params match)
:query q})]
(assoc match :parameters parameters)))))
(defn match-by-name