fixes
This commit is contained in:
parent
ee0eecbd30
commit
48a9f9d204
14 changed files with 186 additions and 130 deletions
|
|
@ -4,15 +4,15 @@ const settingsLoader = require('./settings-loader')
|
|||
function sendMessage (rec) {
|
||||
return Promise.resolve()
|
||||
.then(() => {
|
||||
const settings = settingsLoader.settings
|
||||
const settings = settingsLoader.settings()
|
||||
const pluginCode = configManager.unscoped(settings.config).extraServices.sms
|
||||
|
||||
if (!pluginCode) throw new Error('No sms plugin defined')
|
||||
const account = settings.accounts.plugin
|
||||
const plugin = require('lamassu-' + plugin)
|
||||
const account = settings.accounts[pluginCode]
|
||||
const plugin = require('lamassu-' + pluginCode)
|
||||
|
||||
return plugin.sendMessage(account, rec)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports({sendMessage})
|
||||
module.exports = {sendMessage}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue