From 4aa0816cf95018ca34016ed0e677ecd6c9226a26 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Sun, 8 Feb 2026 14:23:13 +0100 Subject: [PATCH] Oops wrong one --- src/app/api/run/route.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/api/run/route.ts b/src/app/api/run/route.ts index b529d1f..71fbd99 100644 --- a/src/app/api/run/route.ts +++ b/src/app/api/run/route.ts @@ -36,10 +36,10 @@ export async function PUT(req: NextRequest) { } export async function POST(req: NextRequest) { - const runId = req.nextUrl.searchParams.get("runId"); + const { runId } = await req.json(); if (!runId) - return NextResponse.json({ error: "missing ?runId=" }, { status: 400 }); + return NextResponse.json({ error: "body requires runId" }, { status: 400 }); const supabase = await createClient(); @@ -62,10 +62,10 @@ export async function POST(req: NextRequest) { } export async function DELETE(req: NextRequest) { - const { runId } = await req.json(); + const runId = req.nextUrl.searchParams.get("runId"); if (!runId) - return NextResponse.json({ error: "body requires runId" }, { status: 400 }); + return NextResponse.json({ error: "missing ?runId=" }, { status: 400 }); const supabase = await createClient();