fix: update highlights API route params to Next.js 15 async format
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user