feat: 添加推送通知功能,支持Web Push订阅和发送
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
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 });
|
||||
}
|
||||
Reference in New Issue
Block a user