Generated api endpoints clash with defined api endpoints with same name #7014
Arctomachine
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Concerns only v3 inside nextjs project.
Imagine following project conditions:
animals
./(app)/api/animals/route.js
which is invoked at get request and uses local api to fetch some dataThen defined route in
(app)
folder will precede generated route in(payload)
folder. It means any get request to/api/animals
will be handled by whatever logic that file uses. That includes requests from admin panel, which most certainly expects different response and which will error because of that.I dont have good solution to suggest, but I propose to discuss what can be done to eliminate or at least reduce clashing with user defined endpoints
Beta Was this translation helpful? Give feedback.
All reactions