File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
app/api/get-schema/[name] Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,13 @@ function isValidSchemaObject(value: unknown): value is Record<string, unknown> {
2424 return typeof value === 'object' && value !== null && ! Array . isArray ( value ) ;
2525}
2626
27+ // Force dynamic rendering to avoid prerender errors
28+ export const dynamic = "force-dynamic" ;
29+ export const fetchCache = "force-no-store" ;
30+
2731// Use the simplest form for Next.js 15 compatibility
28- export async function GET ( request , context ) {
32+ // Type the parameters with any to satisfy TypeScript without conflicting with Next.js
33+ export async function GET ( request : any , context : any ) {
2934 // Extract schema name from URL params
3035 const schemaName = context . params . name ;
3136
@@ -97,7 +102,4 @@ export async function GET(request, context) {
97102 { status : 500 }
98103 ) ;
99104 }
100- }
101-
102- // Ensure this route is always dynamic and not cached
103- export const dynamic = "force-dynamic" ;
105+ }
You can’t perform that action at this time.
0 commit comments