mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 17:01:11 +00:00
Don't push :path-params if there aren't any
This commit is contained in:
parent
d60c67c0c3
commit
ac8a7b5cd2
1 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
(if handler
|
(if handler
|
||||||
(handler
|
(handler
|
||||||
(cond-> (impl/fast-assoc request ::match match)
|
(cond-> (impl/fast-assoc request ::match match)
|
||||||
params (impl/fast-assoc :path-params params)))))))
|
(seq params) (impl/fast-assoc :path-params params)))))))
|
||||||
([request respond raise]
|
([request respond raise]
|
||||||
(if-let [match (reitit/match-by-path router (:uri request))]
|
(if-let [match (reitit/match-by-path router (:uri request))]
|
||||||
(let [method (:request-method request :any)
|
(let [method (:request-method request :any)
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
(if handler
|
(if handler
|
||||||
(handler
|
(handler
|
||||||
(cond-> (impl/fast-assoc request ::match match)
|
(cond-> (impl/fast-assoc request ::match match)
|
||||||
params (impl/fast-assoc :path-params params))
|
(seq params) (impl/fast-assoc :path-params params))
|
||||||
respond raise))))))
|
respond raise))))))
|
||||||
{::router router}))
|
{::router router}))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue