blob: d8e6b55e8e3715a715e76320ee26db28198368af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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) {
return res.redirect(302, "/play");
}
return res.redirect(302, "/login");
});
export default router;
|