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
|
// DELETE /api/highlights/[id]?locale=en - Delete highlight
|
||||||
export async function PUT(
|
export async function PUT(
|
||||||
req: NextRequest,
|
req: NextRequest,
|
||||||
{ params }: { params: { id: string } }
|
context: { params: Promise<{ id: string }> }
|
||||||
) {
|
) {
|
||||||
|
const params = await context.params
|
||||||
try {
|
try {
|
||||||
const authHeader = req.headers.get('authorization')
|
const authHeader = req.headers.get('authorization')
|
||||||
if (!authHeader) {
|
if (!authHeader) {
|
||||||
@@ -50,8 +51,9 @@ export async function PUT(
|
|||||||
|
|
||||||
export async function DELETE(
|
export async function DELETE(
|
||||||
req: NextRequest,
|
req: NextRequest,
|
||||||
{ params }: { params: { id: string } }
|
context: { params: Promise<{ id: string }> }
|
||||||
) {
|
) {
|
||||||
|
const params = await context.params
|
||||||
try {
|
try {
|
||||||
const authHeader = req.headers.get('authorization')
|
const authHeader = req.headers.get('authorization')
|
||||||
if (!authHeader) {
|
if (!authHeader) {
|
||||||
|
|||||||
Reference in New Issue
Block a user