Success notification and redirect back to Twilio API page on successful text send.
parent
a34dabbc68
commit
78a3e681fb
|
@ -397,7 +397,7 @@ exports.postTwilio = function(req, res, next) {
|
||||||
};
|
};
|
||||||
twilio.sendMessage(message, function(err, responseData) {
|
twilio.sendMessage(message, function(err, responseData) {
|
||||||
if (err) return next(err);
|
if (err) return next(err);
|
||||||
console.log(responseData.from);
|
req.flash('success', { msg: 'Text sent to ' + responseData.to + '.'})
|
||||||
console.log(responseData.body);
|
res.redirect('/api/twilio');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue