instantcommerce / next-api-decorators

Collection of decorators to create typed Next.js API routes, with easy request validation and transformation.
https://next-api-decorators.vercel.app
MIT License
412 stars 29 forks source link

Path-to-regexp buggs methods / routes? #530

Closed xarielah closed 1 year ago

xarielah commented 1 year ago

Hey since yesterday I'm experiencing in my newly created project a bug where I set the handler, and methods (ex. /api/auth/register) and it works fine, but as soon as I installed path-to-regexp all my default (non-regexp paths) paths have broken.

For example: image image

but the regexp paths do work just fine.

My files were set to be:

I also tried:

and still it does not work (sometimes it does, but in a weird way - to doesn't then it does, and then it doesn't).

xarielah commented 1 year ago

@ggurkal

ggurkal commented 1 year ago

Hi @xarielah

Thanks for the report!

There was a fix that was only released in the beta channel, but now it's released under v2.0.1 which should fix what you are experiencing.

Feel free to re-open if your problem persists.

JamesIde commented 1 year ago

I don't have anything to say but this product excites me in ways I didn't know possible. Next API routes with NestJS decorators is awesome...