Closed SagnikPradhan closed 2 years ago
@SagnikPradhan Hi, we have a two PR for this issue:
Can you review #155? and we will try to merge it.
if you don't mind it can be closed, what do you think about it?
Closed in favor of https://github.com/koajs/router/pull/155
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.
Rather than removing the support of router middleware for verb methods, I explicitly added them. The reason we were getting the
Unexpected CHAR at 1, expected END path-to-regexp
error was because forpath-to-regexp
a route handler is also a valid path unless you added more than one parameter.I don't see a reason not to support middlewares with verb methods by default rather than allow users to do wildcards by themselves.