diff --git a/packages/next/src/routes/index.ts b/packages/next/src/routes/index.ts index f7669b8fa..eb27c2670 100644 --- a/packages/next/src/routes/index.ts +++ b/packages/next/src/routes/index.ts @@ -72,7 +72,7 @@ export const enhanceRouteHandler = < return async function routeHandler( request: NextRequest, routeParams: { - params: Record; + params: Promise>; }, ) { type UserParam = Params['auth'] extends false ? undefined : User; @@ -126,7 +126,7 @@ export const enhanceRouteHandler = < request, body, user, - params: routeParams.params, + params: await routeParams.params, }); }; };