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:
paoloar77
2022-08-07 02:01:35 +02:00
parent 8a587dc715
commit e433d3db8c
8 changed files with 76 additions and 41 deletions

View File

@@ -50,7 +50,7 @@ router.post('/', authenticate, (req, res) => {
recmsg.typedir = shared_consts.TypeNotifs.TYPEDIR_EVENTS;
recmsg.typeid = shared_consts.TypeNotifs.ID_EVENTS_REMOVE_REC;
return SendNotif.saveAndSendNotif(recmyevent, req, res).then((out) => {
return await SendNotif.saveAndSendNotif(recmyevent, req, res).then((out) => {
if (out)
return res.send({ code: server_constants.RIS_CODE_OK, msg: '', id: recmsg._id });
else