mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 22:24:58 +05:00
20 lines
527 B
JavaScript
20 lines
527 B
JavaScript
|
const express = require("express"),
|
||
|
router = express.Router(),
|
||
|
CheckAuth = require("../auth/CheckAuth"),
|
||
|
fs = require("fs"),
|
||
|
marked = require("marked");
|
||
|
|
||
|
router.get("/", CheckAuth, function (req, res) {
|
||
|
var md = function (filename) {
|
||
|
return marked.parse(fs.readFileSync("./dashboard/views/docs/" + filename, "utf8"));
|
||
|
};
|
||
|
|
||
|
res.render("commands", {
|
||
|
user: req.userInfos,
|
||
|
translate: req.translate,
|
||
|
currentURL: `${req.client.config.dashboard.baseURL}/${req.originalUrl}`,
|
||
|
"md": md
|
||
|
});
|
||
|
});
|
||
|
|
||
|
module.exports = router;
|