Add to the Circuit

Remove to the Circuit
Revoke request
Users Admins
This commit is contained in:
paoloar77
2022-09-02 02:25:38 +02:00
parent f55d69b7fe
commit 6bee366547
20 changed files with 598 additions and 274 deletions

View File

@@ -716,7 +716,7 @@ router.post('/circuits/cmd', authenticate, (req, res) => {
const idapp = req.body.idapp;
const locale = req.body.locale;
const usernameOrig = req.body.usernameOrig;
const name = req.body.name;
const circuitname = req.body.circuitname;
const cmd = req.body.cmd;
const value = req.body.value;
@@ -728,12 +728,12 @@ router.post('/circuits/cmd', authenticate, (req, res) => {
}
}*/
return User.setCircuitCmd(idapp, usernameOrig, name, cmd, value, usernameLogged).
return User.setCircuitCmd(idapp, usernameOrig, circuitname, cmd, value, usernameLogged).
then((ris) => {
res.send(ris);
}).
catch((e) => {
tools.mylog('ERRORE IN groups/cmd: ' + e.message);
tools.mylog('ERRORE IN circuits/cmd: ' + e.message);
res.status(400).send();
});