From 239e3a33006bbf24f78caa1ba44d20c638e9d25a Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Fri, 19 Jul 2024 18:23:43 +0100 Subject: [PATCH] fix typo in sw --- push.js | 2 +- sw.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/push.js b/push.js index 4de426a..6413ed6 100644 --- a/push.js +++ b/push.js @@ -7,5 +7,5 @@ let vapidKeys = { push.setVapidDetails('mailto:@code.co.uk', vapidKeys.publicKey, vapidKeys.privateKey) -let sub = {} +let sub = {"endpoint":"https://fcm.googleapis.com/fcm/send/cYpbsEqV2Mc:APA91bHwJIclUhZ70TCfAWTJDyWsPM-uh11yrJc6O_vO2v7fViTaRu5QZbV66HDJUDsHKPXnRGrrkY8IkpTTmYf8QbfeN5GWSmBX762fZ4cGf-RoKYSjgG9XPnc2PQjCYVN48qqPOThK","expirationTime":null,"keys":{"p256dh":"BDDMvBH__dUnbEd0s4Rnfnru6lyIAHMOo9foGoL3miaxkyvyOJrfzinS8kpwFXXGT4qcyRTtBlZaU78Ul80JPWU","auth":"C2K00EPNsopcnB_NxsTssg"}} push.sendNotification(sub, 'test message') \ No newline at end of file diff --git a/sw.js b/sw.js index 5dba61a..04fda38 100644 --- a/sw.js +++ b/sw.js @@ -1,3 +1,3 @@ self.addEventListener('push', () => { - self.registration.sendNotification('test message', {}) -}) \ No newline at end of file + self.registration.showNotification('Hello world!', options); +}); \ No newline at end of file