aboutsummaryrefslogtreecommitdiff
path: root/controllers/user.js
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-05-07 00:17:56 +0200
committerMateja <mail@matejamaric.com>2021-05-07 00:17:56 +0200
commitd7e364d83153425e412032dd997e9c58cbc235eb (patch)
treea2095100f5c5e65633c0015a0cc378deb040ac62 /controllers/user.js
parent3237737dc88ebff88c258972ac902f9221a003b5 (diff)
downloadnode-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.js6
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('/');
},