Feat: add notification center row in notification settings table

This commit is contained in:
Cesar 2021-01-20 12:22:02 +00:00 committed by Josh Harvey
parent 1ab4b68168
commit 34f2b84fe2
8 changed files with 109 additions and 69 deletions

View file

@ -343,7 +343,7 @@ function triggerBlock (req, res, next) {
customers.update(id, { authorizedOverride: 'blocked' })
.then(customer => {
notifier.customerComplianceNotify(customer, req.deviceId, 'BLOCKED')
notifier.notifyIfActive('compliance', customer, req.deviceId, 'BLOCKED').catch(console.error)
return respond(req, res, { customer })
})
.catch(next)
@ -362,7 +362,7 @@ function triggerSuspend (req, res, next) {
date.setDate(date.getDate() + days);
customers.update(id, { suspendedUntil: date })
.then(customer => {
notifier.customerComplianceNotify(customer, req.deviceId, 'SUSPENDED', days)
notifier.notifyIfActive('compliance', customer, req.deviceId, 'SUSPENDED', days).catch(console.error)
return respond(req, res, { customer })
})
.catch(next)