feat: add GET endpoint to retrieve contact requests with admin authentication
Some checks are pending
CI/CD / test-and-build (push) Waiting to run
CI/CD / deploy (push) Blocked by required conditions

This commit is contained in:
Najjar\NajjarV02 2026-04-20 11:44:20 +04:00
parent 9394b58b0e
commit e1599650f0

View File

@ -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 });
}