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

pull/2/head
Sahat Yalkabov 2014-01-23 22:36:28 -05:00
parent 2c351ea6eb
commit f26940942a
1 changed files with 1 additions and 1 deletions

View File

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