Feat: compliance blacklisted addresses notifications
This commit is contained in:
parent
1ec56cd1ab
commit
705747e9e0
7 changed files with 48 additions and 14 deletions
|
|
@ -66,6 +66,11 @@ const hasUnreadNotifications = () => {
|
|||
return db.oneOrNone(sql).then(res => res.exists)
|
||||
}
|
||||
|
||||
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,
|
||||
addNotification,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue