mirror of
https://github.com/metosin/reitit.git
synced 2025-12-26 19:48:24 +00:00
handle nil with IntoString
This commit is contained in:
parent
771128c281
commit
26be209d3a
2 changed files with 9 additions and 4 deletions
|
|
@ -196,10 +196,13 @@
|
|||
|
||||
#?(:clj Object
|
||||
:cljs object)
|
||||
(into-string [this] (str this)))
|
||||
(into-string [this] (str this))
|
||||
|
||||
nil
|
||||
(into-string [this]))
|
||||
|
||||
(defn path-params
|
||||
"shallow transform of the path-param values into strings"
|
||||
"shallow transform of the path parameters values into strings"
|
||||
[params]
|
||||
(reduce-kv
|
||||
(fn [m k v]
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@
|
|||
:s "kikka"
|
||||
:u "c2541900-17a7-4353-9024-db8ac258ba4e"
|
||||
:k "kikka"
|
||||
:qk "reitit.impl-test%2Fkikka"}
|
||||
:qk "reitit.impl-test%2Fkikka"
|
||||
:nil nil}
|
||||
(impl/path-params {:n 1
|
||||
:n1 -1
|
||||
:n2 (long 1)
|
||||
|
|
@ -45,4 +46,5 @@
|
|||
:s "kikka"
|
||||
:u #uuid "c2541900-17a7-4353-9024-db8ac258ba4e"
|
||||
:k :kikka
|
||||
:qk ::kikka}))))
|
||||
:qk ::kikka
|
||||
:nil nil}))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue