File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ import { AppRouteRequestHandlerOptions } from '.';
66import { RPCApiHandler } from '../api' ;
77import { loadAssets } from '../shared' ;
88
9- type Context = { params : Promise < { path : string [ ] } > | { path : string [ ] } } ;
9+ type Context = { params : Promise < { path : string [ ] } > } ;
1010
1111/**
12- * Creates a Next.js 13 "app dir" API route request handler which encapsulates Prisma CRUD operations.
12+ * Creates a Next.js "app dir" API route request handler which encapsulates Prisma CRUD operations.
1313 *
1414 * @remarks Since Next.js 15, `context.params` is asynchronous and must be awaited.
1515 * @param options Options for initialization
@@ -28,7 +28,7 @@ export default function factory(
2828 return NextResponse . json ( { message : 'unable to get prisma from request context' } , { status : 500 } ) ;
2929 }
3030
31- let params : Context [ 'params' ] ;
31+ let params : Awaited < Context [ 'params' ] > ;
3232 const url = new URL ( req . url ) ;
3333 const query = Object . fromEntries ( url . searchParams ) ;
3434
You can’t perform that action at this time.
0 commit comments