From d7e364d83153425e412032dd997e9c58cbc235eb Mon Sep 17 00:00:00 2001 From: Mateja Date: Fri, 7 May 2021 00:17:56 +0200 Subject: Using `passport.js` for login system. --- controllers/user.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'controllers/user.js') diff --git a/controllers/user.js b/controllers/user.js index 980fc12..3f7b4a1 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -22,12 +22,8 @@ module.exports = { } }, - login(req, res) { - console.log(req.body); - res.redirect('/login'); - }, - logout(req, res) { + req.logout(); res.redirect('/'); }, -- cgit v1.2.3