diff options
Diffstat (limited to 'routes/logout.js')
-rw-r--r-- | routes/logout.js | 16 |
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; |