Path parameters are undefined for routes deeper than 1 level.
hovissimo opened this issue · 0 comments
hovissimo commented
Reproduction at https://github.com/hovissimo/enhance-arbitrary-parameter-depth
See Discord thread at https://discord.com/channels/1012099764713705472/1012435743571988560/1025289256375173136
If a route with a path parameter that has more than one layer above will never have a defined path parameter.
E.g. if your route is /foo/bar/$key
and you request /foo/bar/baz
, then req.params.key
is undefined. If your route is /foo/$key
and you request /foo/baz
then req.params.key
is "baz"
.