File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,20 @@ import fs from "fs/promises";
33import path from "path" ;
44import jsonc from "jsonc" ;
55
6- // Define the expected structure of the context parameter
7- // Remove the custom GetContext interface
8- // interface GetContext {
9- // params: {
10- // name: string;
11- // };
12- // }
6+ // Define the context type explicitly
7+ interface RouteContext {
8+ params : {
9+ name : string ;
10+ } ;
11+ }
1312
1413export async function GET (
1514 _request : Request , // Prefix with _ if not used
16- // Use the standard Next.js context typing for route parameters
17- { params } : { params : { name : string } } ,
15+ // Use the explicitly defined RouteContext type
16+ context : RouteContext ,
1817) {
18+ // Destructure params from the context object
19+ const { params } = context ;
1920 console . log ( "[API /api/schemas/[name]] Waiting for params..." ) ;
2021
2122 // Remove await: params is not a promise here
You can’t perform that action at this time.
0 commit comments