Mapped sengrid error message to msg property so it matches express-validator
This commit is contained in:
@ -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!');
|
||||||
|
Reference in New Issue
Block a user