aboutsummaryrefslogtreecommitdiff
path: root/src/server.js
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-10-19 21:55:02 -0500
committerMark Powers <markppowers0@gmail.com>2020-10-19 21:55:02 -0500
commite0a4d1bb1339e80775aa37efaf8cac314278f8e9 (patch)
tree91c09487df6793e4faaed4c0a883cba2ae199d20 /src/server.js
parentad24db7fe9fca72c38caaa40d2ada8cbeb04994d (diff)
Add navigation template and logout
Diffstat (limited to 'src/server.js')
-rw-r--r--src/server.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server.js b/src/server.js
index 541f467..17d5372 100644
--- a/src/server.js
+++ b/src/server.js
@@ -67,6 +67,10 @@ function setUpRoutes(models, jwtFunctions, database, templates) {
let body = templates["login"]({});
res.status(200).send(body)
})
+ server.get('/logout', (req, res) => {
+ res.clearCookie('authorization');
+ res.redirect("/login");
+ });
server.get('/login/signup', async (req, res) => {
let body = templates["signup"]({});
res.status(200).send(body)