Next.js Discord

Discord Forum

Optional catch all routes and api routes conflicting

Unanswered
Ocicat posted this in #help-forum
Open in Discord
Avatar
OcicatOP
I have recently started a new project using the app directory. We like to use an generic optional catch all routes to render any given path at any given time, but the same time I want to have an api route to handle draft/preview mode. So my folder structure looks like in the picture attached, but when I try to it the API route, it hits the optional catch all routes. Any idea how to avoid the conflicting issues?
Image

1 Reply

Avatar
Northeast Congo Lion
Hey @Ocicat did you ever figure this out? Dealing w/ a similar issue