Commit 4935a732 authored by Corentin Mors's avatar Corentin Mors
Browse files

Fix login error when sending to next

parent 55a4991a
......@@ -23,10 +23,10 @@ exports.welcome = function(req, res) {
// Login and logout functions
exports.getLogin = function(req, res, next) {
res.render('login', {error: next});
}
res.render('login', {error: next});
}
exports.postLogin = function(req, res){
exports.postLogin = function(req, res, next){
users.authenticate(req.body.email, req.body.password, function (error, user) {
if (error || !user) {
var err = new Error('Wrong email or password.');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment