req.user; login; logout
This commit is contained in:
parent
9b8c603322
commit
562d252abf
@ -80,11 +80,10 @@ module.exports = function(app, sql, app_cfg, passport) {
|
||||
});
|
||||
|
||||
app.post('/login', passport.authenticate('local', {
|
||||
failureRedirect: '/'
|
||||
failureRedirect: '/login'
|
||||
}), function(req, res) {
|
||||
res.redirect('/');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
app.post('/logout', function(req, res) {
|
||||
req.session.destroy(function(err) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user