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 '.';
6
6
import { RPCApiHandler } from '../api' ;
7
7
import { loadAssets } from '../shared' ;
8
8
9
- type Context = { params : Promise < { path : string [ ] } > | { path : string [ ] } } ;
9
+ type Context = { params : Promise < { path : string [ ] } > } ;
10
10
11
11
/**
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.
13
13
*
14
14
* @remarks Since Next.js 15, `context.params` is asynchronous and must be awaited.
15
15
* @param options Options for initialization
@@ -28,7 +28,7 @@ export default function factory(
28
28
return NextResponse . json ( { message : 'unable to get prisma from request context' } , { status : 500 } ) ;
29
29
}
30
30
31
- let params : Context [ 'params' ] ;
31
+ let params : Awaited < Context [ 'params' ] > ;
32
32
const url = new URL ( req . url ) ;
33
33
const query = Object . fromEntries ( url . searchParams ) ;
34
34
You can’t perform that action at this time.
0 commit comments