summaryrefslogtreecommitdiff
path: root/routes/logout.js
diff options
context:
space:
mode:
authorJulien Dessaux2022-11-19 18:41:35 +0100
committerJulien Dessaux2022-11-19 18:41:35 +0100
commit54e06aa44a3134dfc42db3e4b473abf5e181fc42 (patch)
tree35c2358e0cbe47d21972535b8485aa0fd9756b8d /routes/logout.js
parentUpdated dependencies and fixed lint errors (diff)
downloadjeux-de-mots-54e06aa44a3134dfc42db3e4b473abf5e181fc42.tar.gz
jeux-de-mots-54e06aa44a3134dfc42db3e4b473abf5e181fc42.tar.bz2
jeux-de-mots-54e06aa44a3134dfc42db3e4b473abf5e181fc42.zip
cleaned up the distinction between routes and controllers
Diffstat (limited to '')
-rw-r--r--routes/logout.js16
1 files changed, 0 insertions, 16 deletions
diff --git a/routes/logout.js b/routes/logout.js
deleted file mode 100644
index a92085a..0000000
--- a/routes/logout.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import express from "express";
-
-import session from "../middlewares/sessions.js";
-
-const router = express.Router();
-router.use(session);
-
-router.get("/", (req, res) => {
- if (req.session.user !== undefined) {
- res.clearCookie("JDMSessionId");
- req.session.destroy();
- }
- return res.redirect(302, "/");
-});
-
-export default router;