JaBa/dashboard/routes/index.js

17 lines
431 B
JavaScript
Raw Normal View History

2022-01-04 02:18:28 +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}`,
2022-01-04 02:18:28 +05:00
});
});
module.exports = router;