Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Corentin Mors
avis-de-template-server
Commits
4935a732
Commit
4935a732
authored
Dec 07, 2018
by
Corentin Mors
⚔
Browse files
Fix login error when sending to next
parent
55a4991a
Changes
1
Show whitespace changes
Inline
Side-by-side
controllers/index.js
View file @
4935a732
...
...
@@ -24,9 +24,9 @@ exports.welcome = function(req, res) {
// Login and logout functions
exports
.
getLogin
=
function
(
req
,
res
,
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.
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment