diff options
Diffstat (limited to 'src/server.js')
-rw-r--r-- | src/server.js | 4 |
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) |