founders card

This commit is contained in:
2026-09-14 13:23:14 +00:00
parent c5084170b8
commit 64759ce17d
57 changed files with 5013 additions and 188 deletions
@@ -0,0 +1,20 @@
import { getSessionAccount } from "@/lib/auth/require-session";
import { canReadPage } from "@/lib/auth/permissions";
import { listEarlyPlayerEmails } from "@/lib/card-gen/early-player-emails";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export async function GET() {
const account = await getSessionAccount();
if (!account || !canReadPage(account, "founders-card")) {
return Response.json({ error: "Unauthorized" }, { status: 401 });
}
const result = await listEarlyPlayerEmails();
if ("error" in result) {
return Response.json({ error: result.error }, { status: 500 });
}
return Response.json({ emails: result.rows });
}