import { NextResponse } from 'next/server'; import { getVapidPublicKey } from '@/lib/push-notifications'; export async function GET() { try { const publicKey = await getVapidPublicKey(); if (!publicKey) { return NextResponse.json( { error: 'Push notifications not configured' }, { status: 503 } ); } return NextResponse.json({ publicKey }); } catch (error) { console.error('Failed to get VAPID public key:', error); return NextResponse.json( { error: 'Failed to get VAPID public key' }, { status: 500 } ); } }