summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/auth.js6
-rw-r--r--lib/index.js2
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/auth.js b/lib/auth.js
index 0fb757c..38901e4 100644
--- a/lib/auth.js
+++ b/lib/auth.js
@@ -69,4 +69,10 @@ var auth = module.exports = {
});
})(req, res, next)
},
+
+ logout: function (req, res) {
+ req.logout();
+ res.redirect('/');
+ },
+
} \ No newline at end of file
diff --git a/lib/index.js b/lib/index.js
index 7732001..45def38 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -73,7 +73,7 @@ site.route = function(){
})
app.get("/login", function(req, res){
res.render("pages/login", {
- title: ""
+ title: "login"
})
})
app.get("/index", middleware.ensureAuthenticated, function(req, res){