first version

This commit is contained in:
2025-09-17 16:43:44 -05:00
parent 810fad4beb
commit 6d12e7e151
28 changed files with 939 additions and 153 deletions

11
app/api/domains/route.ts Normal file
View File

@@ -0,0 +1,11 @@
import { db } from '@/app/db/drizzle';
import { domains } from '@/app/db/schema';
import { authenticate } from '@/app/lib/utils';
import { NextRequest, NextResponse } from 'next/server';
export async function GET(req: NextRequest) {
if (!authenticate(req)) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
const domainList = await db.select({ bucket: domains.bucket, domain: domains.domain }).from(domains);
return NextResponse.json(domainList);
}