From e1599650f0567045966f6c0f2ea933c549b89098 Mon Sep 17 00:00:00 2001 From: "Najjar\\NajjarV02" Date: Mon, 20 Apr 2026 11:44:20 +0400 Subject: [PATCH] feat: add GET endpoint to retrieve contact requests with admin authentication --- src/app/api/admin/contacts/route.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/api/admin/contacts/route.ts b/src/app/api/admin/contacts/route.ts index 4118e79..1c24d0d 100644 --- a/src/app/api/admin/contacts/route.ts +++ b/src/app/api/admin/contacts/route.ts @@ -5,7 +5,8 @@ import * as jose from 'jose'; export async function GET(request: Request) { try { - const token = cookies().get('admin_token')?.value; + const cookieStore = await cookies(); + const token = cookieStore.get('admin_token')?.value; if (!token) { return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }); }