From d32177e42282ec131bba992f92b6fce0d2f1699e Mon Sep 17 00:00:00 2001 From: xelargg Date: Sat, 13 Jun 2026 00:33:04 -0400 Subject: [PATCH] fix: webhook routes - undefined params and request --- src/app/api/webhooks/[id]/route.js | 2 +- src/app/api/webhooks/route.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/webhooks/[id]/route.js b/src/app/api/webhooks/[id]/route.js index d858952..0a41649 100644 --- a/src/app/api/webhooks/[id]/route.js +++ b/src/app/api/webhooks/[id]/route.js @@ -4,7 +4,7 @@ import { withAuth } from '@/lib/api/middleware/auth.js'; /** Delete a webhook by ID */ export const DELETE = withAuth(async (event) => { const { supabase, user } = event.locals; - const { id } = params; + const { id } = event.context.params; const { error } = await supabase .from('webhooks') diff --git a/src/app/api/webhooks/route.js b/src/app/api/webhooks/route.js index cd8fd6c..f43ae61 100644 --- a/src/app/api/webhooks/route.js +++ b/src/app/api/webhooks/route.js @@ -25,7 +25,7 @@ export const POST = withAuth(async (event) => { let body; try { - body = await request.json(); + body = await event.request.json(); } catch { return NextResponse.json({ error: 'Invalid JSON' }, { status: 400 }); }