blob: be3681aec358126cd05547b588ca6b373db1b888 (
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 (session.loggedIn) {
return res.redirect(302, "/play");
}
return res.redirect(302, "/login");
});
export default router;
|