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
koa-tree-router
:param
I have the following routes which works just fine.
router.get('/note/:id', middlware); router.get('/notes', middleware); router.post('/note', middleware); router.delete('/', middleware);
when I go another route instance and try registering another route as seen below I get an error.
route2.get('/request-id', middleware);
The error:
^ error: wildcard route ':id' conflicts with existing children in path '/note/:id' at insertChild (/Users/username/**/lib/tree.ts:277:15) at addRoute (/Users/username/**/lib/tree.ts:229:9) at register (/Users/username/**/lib/router.ts:155:5) at all (/Users/username/**/lib/cols**.ts:175:9) at /Users/username/**/example/note-app/src/app.ts:64:1 272 | "'" 273 | ); 274 | } 272 | "'" 273 | ); 274 | } 275 | 276 | if (n.children.length > 0) { 277 | throw new Error( ^
Also, I notice if I change the order of this routes it throw the same error:
Changing this from
To this:
router.get('/notes', middleware); router.get('/note/:id', middlware); router.post('/note', middleware); router.delete('/', middleware);
Doesn it have something to do with this issue
The text was updated successfully, but these errors were encountered:
There are some spelling error in your code example.... If I fix it, then there is no error after changing the router declaration order.
If you are seeing the wild card error, then it should be the same problem as the previous issue.
Sorry, something went wrong.
No branches or pull requests
I have the following routes which works just fine.
when I go another route instance and try registering another route as seen below I get an error.
The error:
Also, I notice if I change the order of this routes it throw the same error:
Changing this from
To this:
Doesn it have something to do with this issue
The text was updated successfully, but these errors were encountered: