fix: update highlights API route params to Next.js 15 async format

This commit is contained in:
2025-10-10 12:03:10 +00:00
parent c7f37aaf18
commit 7e426da91a

View File

@@ -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) {