Skip to content
Snippets Groups Projects
Commit aa725010 authored by lain's avatar lain
Browse files

ServiceWorker: Use clearer variable names

parent 14540e2a
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment