You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm expecting to get id parameter only, but what I get additionally is this empty wildcard "*" parameter. This doesn't happen when using router without mounting.
Is there a way to get only defined path parameters other than manually filtering out wildcard ones? I'm not sure if this is a bug or not, but shouldn't this be handled in the internal urlParams struct field and not in the exported one at least?
The text was updated successfully, but these errors were encountered:
I think it might be confusing because you're getting keys of the sub-router. Can you describe the endpoints you have and what you're looking to capture?
My use case is to capture all URL params and log them in the middleware. I have multiple sub-routers so I end up having multiple "*" parameters in URLParams struct. If this is something that chi needs internally, then I would expect there's another private field in RouteContext to store that, but exported URLParams contains actual URL parameters only, so I don't have to filter them out when reading URLParams field.
Hi!
I want to get all path params for a given request having a router that is mounted onto another one:
The output is:
I'm expecting to get
id
parameter only, but what I get additionally is this empty wildcard "*" parameter. This doesn't happen when using router without mounting.Is there a way to get only defined path parameters other than manually filtering out wildcard ones? I'm not sure if this is a bug or not, but shouldn't this be handled in the internal
urlParams
struct field and not in the exported one at least?The text was updated successfully, but these errors were encountered: