koajs / router

Router middleware for Koa. Maintained by @forwardemail and @ladjs.
MIT License
849 stars 174 forks source link

Should fix #147 #149

Closed SagnikPradhan closed 2 years ago

SagnikPradhan commented 2 years ago

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 for path-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.

etroynov commented 2 years ago

@SagnikPradhan Hi, we have a two PR for this issue:

147 - outdated;

155 - a new one;

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?

titanism commented 2 years ago

Closed in favor of https://github.com/koajs/router/pull/155

titanism commented 2 years ago

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.