Add authenticated login and SSO protection

This commit is contained in:
inman committed 2026-05-29 15:54:13 +08:00
1 parent e36f28a668
commit 0648874801
50 files changed
+1853 -63

No files matched your search

+2
View File
@@ -1,10 +1,12 @@
import { assemblePrompt, type PromptAssemblyInput } from "@/lib/prompt/assembler";
import { jsonError, jsonOk, readJsonBody } from "@/lib/server/api";
import { requireAppUser } from "@/lib/server/auth/current-user";
export const runtime = "nodejs";
export async function POST(request: Request) {
try {
await requireAppUser();
const body = await readJsonBody<PromptAssemblyInput & Record<string, unknown>>(request);
return jsonOk(assemblePrompt(body));
} catch (error) {