Visu Sent Monete

This commit is contained in:
Paolo Arena
2022-09-13 12:28:49 +02:00
parent ef1bd2e138
commit 2f24a02a63
6 changed files with 205 additions and 78 deletions

View File

@@ -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);