mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 16:31: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
|
||||
(handler
|
||||
(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]
|
||||
(if-let [match (reitit/match-by-path router (:uri request))]
|
||||
(let [method (:request-method request :any)
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
(if handler
|
||||
(handler
|
||||
(cond-> (impl/fast-assoc request ::match match)
|
||||
params (impl/fast-assoc :path-params params))
|
||||
(seq params) (impl/fast-assoc :path-params params))
|
||||
respond raise))))))
|
||||
{::router router}))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue