push notifications working again

This commit is contained in:
Dobromir Popov
2024-05-07 10:48:02 +03:00
parent ceb686701e
commit 201399bc7a
2 changed files with 61 additions and 2 deletions

View File

@ -58,8 +58,8 @@ const Notification = async (req, res) => {
}
if (req.method == 'POST') {
const { subscription, id, broadcast, title = 'Hello Web Push', message = 'Your web push notification is here!' } = req.body
if (req.method == 'POST') {//title = "ССС", message = "Ще получите уведомление по този начин.")
const { subscription, id, broadcast, title = 'ССОМ', message = 'Ще получавате уведомления така.' } = req.body
if (broadcast) {
await broadcastPush(title, message)
res.statusCode = 200