Notification with Service Workers now is working!
When a Notification arrives, it save into the IndexDb, then in Vue.js call a polling to check in the db if there is a different record count. If is different then call a get to update the notification.
This commit is contained in:
@@ -5,7 +5,7 @@ import { Api } from '@api'
|
||||
import * as Types from '@src/store/Api/ApiTypes'
|
||||
|
||||
async function sendRequest(url: string, method: string, mydata: any) {
|
||||
if (!process.env.DEBUG) console.log('sendRequest', method, url)
|
||||
if (process.env.DEBUG) console.log('sendRequest', method, url)
|
||||
|
||||
let request
|
||||
if (method === 'GET') request = Api.get(url, mydata)
|
||||
|
||||
Reference in New Issue
Block a user