fix: compliance notifications through sms and email
This commit is contained in:
parent
6537938ec3
commit
129e5555df
2 changed files with 48 additions and 2 deletions
|
|
@ -61,7 +61,7 @@ function triggerBlock (req, res, next) {
|
|||
|
||||
customers.update(id, { authorizedOverride: 'blocked' })
|
||||
.then(customer => {
|
||||
notifier.notifyIfActive('compliance', 'customerComplianceNotify', customer, req.deviceId, 'BLOCKED')
|
||||
notifier.complianceNotify(customer, req.deviceId, 'BLOCKED')
|
||||
return respond(req, res, { customer })
|
||||
})
|
||||
.catch(next)
|
||||
|
|
@ -80,7 +80,7 @@ function triggerSuspend (req, res, next) {
|
|||
date.setDate(date.getDate() + days)
|
||||
customers.update(id, { suspendedUntil: date })
|
||||
.then(customer => {
|
||||
notifier.notifyIfActive('compliance', 'customerComplianceNotify', customer, req.deviceId, 'SUSPENDED', days)
|
||||
notifier.complianceNotify(customer, req.deviceId, 'SUSPENDED', days)
|
||||
return respond(req, res, { customer })
|
||||
})
|
||||
.catch(next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue