import { NextResponse } from 'next/server'; export async function POST(request: Request) { try { const { password } = await request.json(); const adminPassword = process.env.ADMIN_PASSWORD || 'admin123'; // Default for dev if not set if (password === adminPassword) { return NextResponse.json({ success: true }); } else { return NextResponse.json({ error: 'Invalid password' }, { status: 401 }); } } catch (error) { return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 }); } }