Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 8cbe948

Browse files
committed
Bump Twilio version and update code
1 parent 166eb97 commit 8cbe948

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"express-session": "^1.10.3",
3535
"morgan": "^1.5.1",
3636
"sanitize-html": "^1.10.0",
37-
"twilio": "^1.11.1",
37+
"twilio": "3.0.0-rc.13",
3838
"underscore": "^1.8.3"
3939
},
4040
"devDependencies": {

twilioClient.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ module.exports.sendSms = function(to, message) {
77
to: to,
88
from: config.sendingNumber
99
// mediaUrl: imageUrl
10-
}, function(err, data) {
11-
if (err) {
12-
console.error('Could not notify administrator');
13-
console.error(err);
14-
} else {
15-
console.log('Administrator notified');
16-
}
10+
})
11+
.then(function(data) {
12+
console.log('Administrator notified');
13+
})
14+
.catch(function(err, data) {
15+
console.error('Could not notify administrator');
16+
console.error(err);
1717
});
1818
};

0 commit comments

Comments
 (0)