fix: Move testlinks page to API route to resolve static generation error

- Moved /app/testlinks/page.tsx to /app/api/testlinks/route.ts
- Fixed TypeScript null safety issue in regex match
- Removed empty testlinks directory

This resolves the 'Unsupported Server Component type: Module' error during build.
This commit is contained in:
Marco Gallegos
2026-01-19 00:29:44 -06:00
parent 7b0a2b0c40
commit e0d0cd1055

View File

@@ -262,7 +262,7 @@ export async function GET(request: NextRequest) {
<div class="card">
<div>
<span class="method ${api.method.toLowerCase()}">${api.method}</span>
${api.name.includes('FASE') ? `<span class="badge ${api.name.includes('FASE 5') ? 'phase-5' : 'phase-6'}">${api.name.match(/FASE \d+/)[0]}</span>` : ''}
${api.name.includes('FASE') ? `<span class="badge ${api.name.includes('FASE 5') ? 'phase-5' : 'phase-6'}">${api.name.match(/FASE \d+/)?.[0] || 'FASE'}</span>` : ''}
</div>
<h3>${api.name}</h3>
<a href="${baseUrl}${api.url}" target="_blank">${baseUrl}${api.url}</a>
@@ -284,4 +284,4 @@ export async function GET(request: NextRequest) {
'Content-Type': 'text/html; charset=utf-8',
},
})
}
}