Oops wrong one

This commit is contained in:
2026-02-08 14:23:13 +01:00
parent 239770c8b6
commit 4aa0816cf9
+4 -4
View File
@@ -36,10 +36,10 @@ export async function PUT(req: NextRequest) {
} }
export async function POST(req: NextRequest) { export async function POST(req: NextRequest) {
const runId = req.nextUrl.searchParams.get("runId"); const { runId } = await req.json();
if (!runId) if (!runId)
return NextResponse.json({ error: "missing ?runId=" }, { status: 400 }); return NextResponse.json({ error: "body requires runId" }, { status: 400 });
const supabase = await createClient(); const supabase = await createClient();
@@ -62,10 +62,10 @@ export async function POST(req: NextRequest) {
} }
export async function DELETE(req: NextRequest) { export async function DELETE(req: NextRequest) {
const { runId } = await req.json(); const runId = req.nextUrl.searchParams.get("runId");
if (!runId) if (!runId)
return NextResponse.json({ error: "body requires runId" }, { status: 400 }); return NextResponse.json({ error: "missing ?runId=" }, { status: 400 });
const supabase = await createClient(); const supabase = await createClient();