Mapped sengrid error message to msg property so it matches express-validator

This commit is contained in:
Sahat Yalkabov
2014-01-23 22:36:28 -05:00
parent 2c351ea6eb
commit f26940942a

View File

@ -50,7 +50,7 @@ exports.postContact = function(req, res) {
sendgrid.send(email, function(err) { sendgrid.send(email, function(err) {
if (err) { if (err) {
req.flash('errors', err.message); req.flash('errors', { msg: err.message });
return res.redirect('/contact'); return res.redirect('/contact');
} }
req.flash('success', 'Email has been sent successfully!'); req.flash('success', 'Email has been sent successfully!');