diff options
author | Mateja <mail@matejamaric.com> | 2021-05-07 00:17:56 +0200 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-05-07 00:17:56 +0200 |
commit | d7e364d83153425e412032dd997e9c58cbc235eb (patch) | |
tree | a2095100f5c5e65633c0015a0cc378deb040ac62 /controllers/user.js | |
parent | 3237737dc88ebff88c258972ac902f9221a003b5 (diff) | |
download | node-playground-d7e364d83153425e412032dd997e9c58cbc235eb.tar.gz node-playground-d7e364d83153425e412032dd997e9c58cbc235eb.zip |
Using `passport.js` for login system.
Diffstat (limited to 'controllers/user.js')
-rw-r--r-- | controllers/user.js | 6 |
1 files changed, 1 insertions, 5 deletions
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('/'); }, |