Dynamic api route returning an empty object
Answered
Blue-throated Hummingbird posted this in #help-forum
Blue-throated HummingbirdOP
I have the following code, when I navigate to this route
http://localhost:3000/api/user/test I get {} I am expecting it to be the slug, { userId: 'test' } is there anything wrong with my code or my file structure?3 Replies
export async function GET(request, { params })Answer
Blue-throated HummingbirdOP
thank you so much