We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
findAllRoutes
Bun
import { createRouter, addRoute, findAllRoutes } from "rou3"; const router = createRouter(); addRoute(router, "get", "/path", "Static"); addRoute(router, "get", "/path/:name", "Param"); console.log(findAllRoutes(router, "get", "/path"));
Register two routes: /path and /path/:name, or add another route: /path/:bar/:qaz
/path
/path/:name
/path/:bar/:qaz
Use /path to call findAllRoutes, and the result includes /path/:name and /path/:bar/:qaz routes.
No response
[ { data: "Param", params: { name: undefined, }, }, { data: "Static", params: undefined, } ]
The text was updated successfully, but these errors were encountered:
Thanks for report i kinda forgot to do it for findAll too before release. We need to do similar fix of #123. (feel free to PR)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Environment
Bun
Reproduction
Describe the bug
Register two routes:
/path
and/path/:name
, or add another route:/path/:bar/:qaz
Use
/path
to callfindAllRoutes
, and the result includes/path/:name
and/path/:bar/:qaz
routes.Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: