diff options
| author | lain <lain@soykaf.club> | 2020-06-19 15:24:06 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-06-19 15:24:06 +0200 |
| commit | aa725010c5a3eeeb2dae3e6618b057e08fc5fd49 (patch) | |
| tree | 6c9f47a98c033f47ffcec36472c02c406482cff0 | |
| parent | 14540e2a078bd59ca8f13cd5c0b894acad3d639f (diff) | |
ServiceWorker: Use clearer variable names
| -rw-r--r-- | src/sw.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -40,10 +40,10 @@ const maybeShowNotification = async (event) => { const url = `${self.registration.scope}api/v1/notifications/${data.notification_id}` const notification = await fetch(url, { headers: { Authorization: 'Bearer ' + data.access_token } }) - let nj = await notification.json() - nj = parseNotification(nj) + const notificationJson = await notification.json() + const parsedNotification = parseNotification(notificationJson) - const res = prepareNotificationObject(nj, i18n) + const res = prepareNotificationObject(parsedNotification, i18n) self.registration.showNotification(res.title, res) } |
