You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current setup of the 'Create API key' route has been setup using the old 'Pages/Api' setup of NextJS. When copying this logic to the new Route Handler logic of NextJS 13, this does no longer work.
I have fixed the issue and refactored the 'Create API Keys' route so that it works with the latest functionality of Route Handlers. This new way of working with the ROUTE handlers also eliminates the need of the 'withMethods' middleware function to limit the HTTP methods that can call the route.
I can create a PR if you want.
Current NextJS version that I am using is: 13.3.1
The text was updated successfully, but these errors were encountered:
Hi, thanks for the issue! Please create a PR for this. I'd be happy to merge your changes into a new branch to not confuse people expecting the original code in the master branch.
The current setup of the 'Create API key' route has been setup using the old 'Pages/Api' setup of NextJS. When copying this logic to the new Route Handler logic of NextJS 13, this does no longer work.
I have fixed the issue and refactored the 'Create API Keys' route so that it works with the latest functionality of Route Handlers. This new way of working with the ROUTE handlers also eliminates the need of the 'withMethods' middleware function to limit the HTTP methods that can call the route.
I can create a PR if you want.
Current NextJS version that I am using is: 13.3.1
The text was updated successfully, but these errors were encountered: