Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
SOD/routes/logout.js

11 lines
222 B
JavaScript

const express = require("express");
const router = express.Router();
router.get("/", (req, res) => {
if (req.session.user) {
req.session.user = null;
}
res.redirect("/");
});
module.exports = router;