diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/sw.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/frontend/sw.js b/frontend/sw.js index e69de29..bf38ae2 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -0,0 +1,7 @@ +self.addEventListener('push', (e) => { + const data = e.data.json(); + self.registration.showNotification(data.title, { + body: data.body, + icon: data.icon, + }); +}); |
