Closed thewilkybarkid closed 1 month ago
The allowedMethods middleware has a throw option, I'd like to add the same to routes. For now I have a custom middleware (https://github.com/libero/article-store/blob/master/src/middleware/routing.ts), but it'd be great to have it built in.
allowedMethods
throw
routes
You can use the ctx.throw([status], [msg], [properties]) from koa here the full documentation
ctx.throw([status], [msg], [properties])
The
allowedMethods
middleware has athrow
option, I'd like to add the same toroutes
. For now I have a custom middleware (https://github.com/libero/article-store/blob/master/src/middleware/routing.ts), but it'd be great to have it built in.