Skip to content

Commit 09a5852

Browse files
committed
refactor: adjusted sms examples
1 parent a4016f5 commit 09a5852

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

sms/send-unicode-sms.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ const vonage = new Vonage({
1212
apiSecret: VONAGE_API_SECRET,
1313
});
1414

15-
const from = SMS_SENDER_ID;
16-
const to = SMS_TO_NUMBER;
17-
const text = 'こんにちは世界';
18-
const type = 'unicode';
19-
20-
vonage.sms.send({ to, from, text, type })
15+
vonage.sms.send({
16+
to: SMS_TO_NUMBER,
17+
from: SMS_SENDER_ID,
18+
text: 'こんにちは世界',
19+
type: 'unicode',
20+
})
2121
.then((resp) => console.log(resp))
2222
.catch((error) => console.error(error));

sms/send.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ const vonage = new Vonage({
1212
apiSecret: VONAGE_API_SECRET,
1313
});
1414

15-
const from = SMS_SENDER_ID;
16-
const to = SMS_TO_NUMBER;
17-
const text = 'A text message sent using the Vonage SMS API';
18-
19-
vonage.sms.send({ to, from, text })
15+
vonage.sms.send({
16+
to: SMS_TO_NUMBER,
17+
from: SMS_SENDER_ID,
18+
text: 'A text message sent using the Vonage SMS API',
19+
})
2020
.then((resp) => {
2121
console.log('Message sent successfully');
2222
console.log(resp);

0 commit comments

Comments
 (0)