Visu Sent Monete
This commit is contained in:
@@ -712,7 +712,7 @@ router.post('/groups/cmd', authenticate, (req, res) => {
|
||||
|
||||
});
|
||||
|
||||
router.post('/circuits/cmd', authenticate, (req, res) => {
|
||||
router.post('/circuits/cmd', authenticate, async (req, res) => {
|
||||
const usernameLogged = req.user.username;
|
||||
const idapp = req.body.idapp;
|
||||
const locale = req.body.locale;
|
||||
@@ -730,9 +730,14 @@ router.post('/circuits/cmd', authenticate, (req, res) => {
|
||||
}
|
||||
}*/
|
||||
|
||||
return User.setCircuitCmd(idapp, usernameOrig, circuitname, cmd, value, usernameLogged, extrarec).
|
||||
return await User.setCircuitCmd(idapp, usernameOrig, circuitname, cmd, value, usernameLogged, extrarec).
|
||||
then((ris) => {
|
||||
res.send(ris);
|
||||
|
||||
// Check if ìs a Notif to read
|
||||
const idnotif = extrarec['idnotif'] ? extrarec['idnotif'] : '';
|
||||
SendNotif.setNotifAsRead(idapp, usernameOrig, idnotif);
|
||||
|
||||
return res.send(ris);
|
||||
}).
|
||||
catch((e) => {
|
||||
tools.mylog('ERRORE IN circuits/cmd: ' + e.message);
|
||||
|
||||
Reference in New Issue
Block a user