JaBa/dashboard/routes/index.js

17 lines
431 B
JavaScript
Raw Normal View History

2021-12-10 21:39:54 +05:00
const express = require("express"),
CheckAuth = require("../auth/CheckAuth"),
router = express.Router();
router.get("/", CheckAuth, async (req, res) => {
res.redirect("/selector");
});
router.get("/selector", CheckAuth, async(req, res) => {
res.render("selector", {
user: req.userInfos,
translate: req.translate,
currentURL: `${req.client.config.dashboard.baseURL}/${req.originalUrl}`
});
});
module.exports = router;