Success notification and redirect back to Twilio API page on successful text send.

pull/2/head
Sahat Yalkabov 2014-02-06 08:16:35 -05:00
parent a34dabbc68
commit 78a3e681fb
1 changed files with 2 additions and 2 deletions

View File

@ -397,7 +397,7 @@ exports.postTwilio = function(req, res, next) {
};
twilio.sendMessage(message, function(err, responseData) {
if (err) return next(err);
console.log(responseData.from);
console.log(responseData.body);
req.flash('success', { msg: 'Text sent to ' + responseData.to + '.'})
res.redirect('/api/twilio');
});
};