Did not found any solution here: https://nextjs.org/docs/app/api-reference/file-conventions/route.
For anyone looking to grab the dynamic route parameter like I was, it's in the second argument.
/api/something/[id]/route.ts
export async function GET(req, { params }) {
const id = params.id;
}
See the docs here:
https://nextjs.org/docs/app/api-reference/file-conventions/route#context-optional
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With