next-api-decorators
next-api-decorators copied to clipboard
Failed to match deep nested route
for example if the api route file is at '/pages/api/deep/nested/route/[[...params]].ts' then I expect the @Get()
URL pattern should match from /deep/nested/route/
but instead it only match from /deep/
class RouteHandler {
@Get()
public get() {
console.log('should resolve to this');
return true;
}
@Get('/nested/route')
public getDeep() {
console.log('should not resolve to this');
return false;
}
}
The first handle should run instead of the second.
here is the reproduction to play with https://stackblitz.com/edit/nextjs-n4xefv
:tada: This issue has been resolved in version 2.0.1-beta.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Hi @trungtin
Thanks for the bug report! Just released a fix on beta channel. Let me know the outcome.
:tada: This issue has been resolved in version 2.0.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket: