Feat: enable notify operator for OFAC matches

Fix: fix lack of newline in some SVGs

Chore: fix rebase issues
This commit is contained in:
Cesar 2021-01-21 17:04:02 +00:00 committed by Josh Harvey
parent 69d3e4cb9b
commit 05373e83db
6 changed files with 46 additions and 40 deletions

View file

@ -429,6 +429,11 @@ function errorHandler (err, req, res, next) {
function respond (req, res, _body, _status) {
const status = _status || 200
const body = _body || {}
const customer = _.getOr({ sanctions: true }, ['customer'], body)
// sanctions can be null for new customers so we can't use falsy checks
if (customer.sanctions === false) {
notifier.notifyIfActive('compliance', 'sanctionsNotify', customer, req.body.phone).catch(console.error)
}
return res.status(status).json(body)
}