Feat: compliance blacklisted addresses notifications
This commit is contained in:
parent
3b3bdf839b
commit
204e421b3d
9 changed files with 55 additions and 21 deletions
|
|
@ -60,6 +60,11 @@ const invalidateNotification = (id) => {
|
|||
return db.none(sql, [id])
|
||||
}
|
||||
|
||||
const addComplianceNotification = (deviceId, detail, message) => {
|
||||
const sql = `INSERT INTO notifications (id, type, detail, device_id, message, created) values ($1, 'compliance', $2, $3, $4, CURRENT_TIMESTAMP)`
|
||||
return db.oneOrNone(sql, [uuidv4(), detail, deviceId, message])
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
machineEvents: dbm.machineEvents,
|
||||
addHighValueTx,
|
||||
|
|
@ -70,4 +75,5 @@ module.exports = {
|
|||
getAllValidNotifications,
|
||||
getValidNotifications,
|
||||
invalidateNotification,
|
||||
addComplianceNotification
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue