File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,11 @@ export async function GET() {
2020 // }
2121
2222 try {
23- // Adjust path for potentially different cwd() in Vercel - read directly from ./public relative to project root
24- const schemasDirRelative = path . join ( "public" , "api" , "schemas" ) ; // Path relative to project root
25- const files = await fs . readdir ( schemasDirRelative ) ;
23+ // Adjust path for potentially different cwd() in Vercel - try path.resolve
24+ // const schemasDirRelative = path.join("public", "api", "schemas"); // Path relative to project root
25+ const schemasDir = path . resolve ( "./public/api/schemas" ) ;
26+ console . log ( `Attempting to read schema directory: ${ schemasDir } ` ) ; // Add logging
27+ const files = await fs . readdir ( schemasDir ) ;
2628
2729 // Filter to only include JSON files and exclude Zone.Identifier files
2830 const schemaFiles = files . filter (
You can’t perform that action at this time.
0 commit comments