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
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user