Course lesson
Migrate a Next API Route to App Router GET Route Returning a NextResponse
We saw we had to have http methods in our route handlers when we moved our auth route handler over.
- Duration
- 3 min
- Access
- Free
- Transcript
- Retained from source evidence
We saw we had to have http methods in our route handlers when we moved our auth route handler over.
Now by moving our customers api route handler over we see a full implementation of an app router route handler.
To do this we'll need to make a couple changes. Similar to the previous route we migrated we will need to name our file route.ts. From that file we'll rename our function to GET as it returns a list customers.