Closed peterver closed 2 years ago
@wengeezhang @etroynov kindly review once you find some time in your busy schedules
@3imed-jaberi @niftylettuce can you review it?
I also recommend you change the title, because someone may not understand that PR is about a specific issue.
It could be something like:
Improve path checking before route registration
and add in description:
fix for issue #147
- it will link your PR with this issue
p.s thx for your help.
I also recommend you change the title, because someone may not understand that PR is about a specific issue.
It could be something like:
Improve path checking before route registration
and add in description:
fix for issue #147
- it will link your PR with this issuep.s thx for your help.
@etroynov should be done, I've also improved on the verb specific test by running it against all methods exported in the methods module used by the router, let me know if you agree with that approach. Ps: No worries, happy to help :)
We have just published @koajs/router
v11.0.0 which resolves this issue. This is mirrored to koa-router
as well.
https://github.com/koajs/router/releases/tag/v11.0.0
This project is maintained by Forward Email and Lad.
You could probably move those checks to a function
isValidPath
instead but otherwise looks alright. 👍🏻
@SagnikPradhan Agree :). I'll take a look either tonight or tomorrow to move those bits into utility functions, there's some other parts of the validation which could use some abstraction to ensure code readability, of course I'll write some tests for any PR I open, thanks for the tip :).
We have just published
@koajs/router
v11.0.0 which resolves this issue. This is mirrored tokoa-router
as well.https://github.com/koajs/router/releases/tag/v11.0.0
This project is maintained by Forward Email and Lad.
@titanism awesome! I'll regularly check in and chip in where possible, we're heavy users of koa and koa-router and would want to help maintain :)
Checklist
fixes: #147, #148