79239334

Date: 2024-11-30 10:41:16
Score: 1
Natty:
Report link

You're getting this error because in Next.js 15, params is actually a Promise that needs to be awaited. Here is how you can fix this,

export async function GET(
  req: Request, 
  context: { params: Promise<{ providerId: number }> }
) {
  const providerId = (await context.params).providerId;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Durgesh Upadhyay