chore: server code formatting

This commit is contained in:
Rafael Taranto 2025-05-12 15:35:00 +01:00
parent aedabcbdee
commit 68517170e2
234 changed files with 9824 additions and 6195 deletions

View file

@ -3,10 +3,10 @@ const { SMS } = require('@vonage/sms')
const NAME = 'Vonage'
function sendMessage (account, rec) {
function sendMessage(account, rec) {
const credentials = new Auth({
apiKey: account.apiKey,
apiSecret: account.apiSecret
apiSecret: account.apiSecret,
})
const from = account.fromNumber
@ -14,10 +14,9 @@ function sendMessage (account, rec) {
const to = rec.sms.toNumber || account.toNumber
const smsClient = new SMS(credentials)
smsClient.send({ from, text, to })
.catch(err => {
throw new Error(`Vonage error: ${err.message}`)
})
smsClient.send({ from, text, to }).catch(err => {
throw new Error(`Vonage error: ${err.message}`)
})
}
module.exports = {