-
-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
It would be really useful if when defining a route with parameters that you can access the parameter from within the API function.
For example for a route defined at /_api/api/thing/[...slug].ts, it would be great to be able to easily (and maybe even with typesafety) access the value of the slug or for /_api/thing/:a/:b to be able to acess the a and b values.
It's possible this exists already and I am just missing it but I couldn't find any examples in the repo or docs when I searched.
Currently i've been manually passing the URL from the request which works but is not great for long term maintaince. Eg. it will break if I move the file around because it hardcodes the path.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels