fix: WebPush Notification
This commit is contained in:
@@ -28,6 +28,10 @@ module.exports = {
|
||||
console.log(args)
|
||||
},
|
||||
|
||||
mylogserr: function (...args) {
|
||||
console.error(args)
|
||||
},
|
||||
|
||||
allfieldTodo: function () {
|
||||
return ['userId', 'pos', 'category', 'descr', 'priority', 'completed', 'created_at', 'modify_at',
|
||||
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'id_next', 'progress', 'modified']
|
||||
@@ -39,7 +43,7 @@ module.exports = {
|
||||
|
||||
sendBackNotif: function (subscription, payload) {
|
||||
|
||||
// console.log('sendBackNotif:', subscription, payload);
|
||||
console.log('sendBackNotif:', subscription, payload);
|
||||
// Pass object into sendNotification
|
||||
webpush.sendNotification(subscription, JSON.stringify(payload)).catch(err => console.error(err));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user