mirror of
https://github.com/metosin/reitit.git
synced 2026-01-29 01:10:34 +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
|
#?(:clj Object
|
||||||
:cljs object)
|
:cljs object)
|
||||||
(into-string [this] (str this)))
|
(into-string [this] (str this))
|
||||||
|
|
||||||
|
nil
|
||||||
|
(into-string [this]))
|
||||||
|
|
||||||
(defn path-params
|
(defn path-params
|
||||||
"shallow transform of the path-param values into strings"
|
"shallow transform of the path parameters values into strings"
|
||||||
[params]
|
[params]
|
||||||
(reduce-kv
|
(reduce-kv
|
||||||
(fn [m k v]
|
(fn [m k v]
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@
|
||||||
:s "kikka"
|
:s "kikka"
|
||||||
:u "c2541900-17a7-4353-9024-db8ac258ba4e"
|
:u "c2541900-17a7-4353-9024-db8ac258ba4e"
|
||||||
:k "kikka"
|
:k "kikka"
|
||||||
:qk "reitit.impl-test%2Fkikka"}
|
:qk "reitit.impl-test%2Fkikka"
|
||||||
|
:nil nil}
|
||||||
(impl/path-params {:n 1
|
(impl/path-params {:n 1
|
||||||
:n1 -1
|
:n1 -1
|
||||||
:n2 (long 1)
|
:n2 (long 1)
|
||||||
|
|
@ -45,4 +46,5 @@
|
||||||
:s "kikka"
|
:s "kikka"
|
||||||
:u #uuid "c2541900-17a7-4353-9024-db8ac258ba4e"
|
:u #uuid "c2541900-17a7-4353-9024-db8ac258ba4e"
|
||||||
:k :kikka
|
:k :kikka
|
||||||
:qk ::kikka}))))
|
:qk ::kikka
|
||||||
|
:nil nil}))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue