Initial commit

This commit is contained in:
kikootwo
2026-01-28 11:41:24 -05:00
commit a3ba192fbd
257 changed files with 89482 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
/**
* Component: Setup Status Check API
* Documentation: documentation/setup-wizard.md
*/
import { NextRequest, NextResponse } from 'next/server';
import { prisma } from '@/lib/db';
/**
* GET /api/setup/status
* Returns whether initial setup has been completed
* Used by middleware for routing logic
*/
export async function GET(request: NextRequest) {
try {
const config = await prisma.configuration.findUnique({
where: { key: 'setup_completed' },
});
const setupComplete = config?.value === 'true';
return NextResponse.json({
setupComplete,
});
} catch (error) {
// If database is not ready or table doesn't exist, setup is not complete
console.error('[Setup Status] Check failed:', error);
return NextResponse.json({
setupComplete: false,
});
}
}