From 7e426da91a6f1ca2bafa9226f6a531b905b351b4 Mon Sep 17 00:00:00 2001 From: Andrei Date: Fri, 10 Oct 2025 12:03:10 +0000 Subject: [PATCH] fix: update highlights API route params to Next.js 15 async format --- app/api/highlights/[id]/route.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/api/highlights/[id]/route.ts b/app/api/highlights/[id]/route.ts index df0cb94..a2d7339 100644 --- a/app/api/highlights/[id]/route.ts +++ b/app/api/highlights/[id]/route.ts @@ -6,8 +6,9 @@ import { verifyToken } from '@/lib/auth' // DELETE /api/highlights/[id]?locale=en - Delete highlight export async function PUT( req: NextRequest, - { params }: { params: { id: string } } + context: { params: Promise<{ id: string }> } ) { + const params = await context.params try { const authHeader = req.headers.get('authorization') if (!authHeader) { @@ -50,8 +51,9 @@ export async function PUT( export async function DELETE( req: NextRequest, - { params }: { params: { id: string } } + context: { params: Promise<{ id: string }> } ) { + const params = await context.params try { const authHeader = req.headers.get('authorization') if (!authHeader) {