refactor: give settings object to complianceNotify

This commit is contained in:
siiky 2024-03-27 14:27:00 +00:00
parent 08843ec73a
commit 068f68e838
2 changed files with 7 additions and 8 deletions

View file

@ -166,12 +166,9 @@ function transactionNotify (tx, rec) {
})
}
function complianceNotify (customer, deviceId, action, period) {
return Promise.all([
settingsLoader.loadLatest(),
queries.getMachineName(deviceId)
])
.then(([settings, machineName]) => {
function complianceNotify (settings, customer, deviceId, action, period) {
return queries.getMachineName(deviceId)
.then(machineName => {
const notifications = configManager.getGlobalNotifications(settings.config)
const msgCore = {