mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 00:41:12 +00:00
Fix based on Miikka’s comments
This commit is contained in:
parent
1c026569d9
commit
586b02f67d
1 changed files with 6 additions and 7 deletions
|
|
@ -166,7 +166,7 @@
|
|||
(some-> s
|
||||
#?(:clj (URLEncoder/encode "UTF-8")
|
||||
:cljs (js/encodeURIComponent))
|
||||
(.replace "+" "%20")))
|
||||
#?(:clj (.replace "+" "%20"))))
|
||||
|
||||
(defn url-decode [s]
|
||||
(some-> s #?(:clj (URLDecoder/decode "UTF-8")
|
||||
|
|
@ -201,9 +201,8 @@
|
|||
(defn path-params
|
||||
"shallow transform of the path-param values into strings"
|
||||
[params]
|
||||
(persistent!
|
||||
(reduce-kv
|
||||
(fn [m k v]
|
||||
(assoc! m k (url-encode (into-string v))))
|
||||
(transient {})
|
||||
params)))
|
||||
(reduce-kv
|
||||
(fn [m k v]
|
||||
(assoc m k (url-encode (into-string v))))
|
||||
{}
|
||||
params))
|
||||
|
|
|
|||
Loading…
Reference in a new issue