Add Web Push warning notification backend
This commit is contained in:
11
app/api/notifications/vapid-key/route.ts
Normal file
11
app/api/notifications/vapid-key/route.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { getVapidPublicKey, isWebPushConfigured } from "@/lib/push-service";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
|
||||
export function GET() {
|
||||
return NextResponse.json({
|
||||
configured: isWebPushConfigured(),
|
||||
publicKey: getVapidPublicKey(),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user