// 클라이언트가 푸시 구독 시 사용할 VAPID 공개키 제공
import { NextResponse } from "next/server";
import { getVapidPublicKey } from "@/lib/push";
import { requireMomoUser } from "@/lib/momo-guard";

export async function GET() {
  const r = await requireMomoUser();
  if (r instanceof NextResponse) return r;
  return NextResponse.json({ publicKey: getVapidPublicKey() });
}
