10 lines
294 B
TypeScript

import { NextResponse } from 'next/server';
export async function GET() {
const publicKey = process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY;
if (!publicKey) {
return NextResponse.json({ error: 'VAPID public key not found' }, { status: 500 });
}
return NextResponse.json({ publicKey });
}