BREAKING CHANGE(deps): upgrade major dependencies, migrate action.target to action.targets (array), adapt to SmartRequest API changes, and add RADIUS server support
This commit is contained in:
@@ -68,13 +68,13 @@ export class SmsService {
|
||||
recipients: [{ msisdn: toNumber }],
|
||||
};
|
||||
|
||||
const resp = await plugins.smartrequest.SmartRequestClient.create()
|
||||
const resp = await plugins.smartrequest.SmartRequest.create()
|
||||
.url('https://gatewayapi.com/rest/mtsms')
|
||||
.header('Authorization', `Basic ${Buffer.from(`${this.config.apiGatewayApiToken}:`).toString('base64')}`)
|
||||
.header('Content-Type', 'application/json')
|
||||
.json(payload)
|
||||
.post();
|
||||
const json = resp.body;
|
||||
const json = await resp.json();
|
||||
logger.log('info', `sent an sms to ${toNumber} with text '${messageText}'`, {
|
||||
eventType: 'sentSms',
|
||||
sms: {
|
||||
|
||||
Reference in New Issue
Block a user