Update Dockerfile, Passport-ActiveDirectory.js, package-lock.json, dpanel.js, index.js, and server.js
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-03-27 20:06:02 +01:00
parent 96466073a5
commit 1d456a588a
7 changed files with 307 additions and 34 deletions

View File

@@ -669,7 +669,7 @@ router.post('/dashboard/update-role', authMiddleware, async (req, res) => {
router.post('/dashboard/update-setup', authMiddleware, async (req, res) => {
try {
let setup = JSON.parse(fs.readFileSync(path.join(__dirname, '../../setup.json')));
let setup = JSON.parse(fs.readFileSync(path.join(__dirname, '../setup.json')));
if (!req.body.ldap || !req.body.ldap.enabled) {
delete setup.ldap;
@@ -686,7 +686,7 @@ router.post('/dashboard/update-setup', authMiddleware, async (req, res) => {
setup.domain = req.body.domain;
setup.uptime = req.body.uptime;
fs.writeFileSync(path.join(__dirname, '../../setup.json'), JSON.stringify(setup, null, 2));
fs.writeFileSync(path.join(__dirname, '../setup.json'), JSON.stringify(setup, null, 2));
res.redirect('/dpanel/dashboard/admin');
} catch (err) {