File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -3,24 +3,24 @@ import fs from "fs/promises";
33import path from "path" ;
44import jsonc from "jsonc" ;
55
6- // Define the context type explicitly
7- interface RouteContext {
8- params : {
9- name : string ;
10- } ;
11- }
6+ // Remove the explicit RouteContext interface
7+ // interface RouteContext {
8+ // params: {
9+ // name: string;
10+ // };
11+ // }
1212
1313export async function GET (
1414 _request : Request , // Prefix with _ if not used
15- // Use the explicitly defined RouteContext type
16- context : RouteContext ,
15+ // Use the correct Next.js 15 type signature with Promise
16+ { params } : { params : Promise < { name : string } > } ,
1717) {
18- // Destructure params from the context object
19- const { params } = context ;
18+ // Remove the explicit destructuring added in the previous step
19+ // const { params } = context;
2020 console . log ( "[API /api/schemas/[name]] Waiting for params..." ) ;
2121
22- // Remove await: params is not a promise here
23- const awaitedParams = params ;
22+ // Ensure params is awaited (was likely correct before, but confirming)
23+ const awaitedParams = await params ;
2424 console . log (
2525 "[API /api/schemas/[name]] Incoming params resolved:" ,
2626 awaitedParams ,
You can’t perform that action at this time.
0 commit comments