From d8a6d43ae16637509cf987875997a095ee6ef253 Mon Sep 17 00:00:00 2001 From: streaper2 Date: Wed, 15 Apr 2026 22:15:42 +0200 Subject: [PATCH] correction route param --- app/api/businesses/[id]/view/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/businesses/[id]/view/route.ts b/app/api/businesses/[id]/view/route.ts index 8fab636..26c9378 100644 --- a/app/api/businesses/[id]/view/route.ts +++ b/app/api/businesses/[id]/view/route.ts @@ -3,10 +3,10 @@ import prisma from '../../../../../lib/prisma'; export async function POST( request: NextRequest, - { params }: { params: { id: string } } + { params }: { params: Promise<{ id: string }> } ) { try { - const { id } = params; + const { id } = await params; if (!id) { return NextResponse.json({ error: 'ID requis' }, { status: 400 });