From 4e38397bfde62ecd70883f6c9eef3d33e8ead157 Mon Sep 17 00:00:00 2001 From: Hannah dagemark Date: Mon, 31 Aug 2026 02:46:35 +0200 Subject: [PATCH] Use request body --- app/api/services/[id]/route.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/api/services/[id]/route.ts b/app/api/services/[id]/route.ts index 49402bb..7a0914c 100644 --- a/app/api/services/[id]/route.ts +++ b/app/api/services/[id]/route.ts @@ -1,6 +1,9 @@ const BACKEND_URL = process.env.BACKEND_URL; -export async function GET({ params }: { params: Promise<{ id: string }> }) { +export async function GET( + _request: Request, + { params }: { params: Promise<{ id: string }> }, +) { const { id } = await params; const response = await fetch(`${BACKEND_URL}/services/${id}`); @@ -15,7 +18,10 @@ export async function GET({ params }: { params: Promise<{ id: string }> }) { return Response.json(data); } -export async function DELETE({ params }: { params: Promise<{ id: string }> }) { +export async function DELETE( + _request: Request, + { params }: { params: Promise<{ id: string }> }, +) { const { id } = await params; const response = await fetch(`${BACKEND_URL}/services/${id}`, { method: "DELETE",