- corretto scheda prodotto, record salvato

This commit is contained in:
Surya Paolo
2025-05-01 00:20:16 +02:00
parent 97abe8b46d
commit fcc3755c19
13 changed files with 89 additions and 49 deletions

View File

@@ -518,7 +518,7 @@ router.post('/settable', authenticate, async (req, res) => {
})
.then(async (risult) => {
let rec = null;
if (risult && risult.acknowledged === 1) {
if (risult && risult.acknowledged) {
rec = await mytable.findById(mytablerec._id).lean();
} else {
rec = risult;

View File

@@ -99,7 +99,7 @@ router.post('/cmd', authenticate_noerror, async (req, res) => {
}
let state = (value && ris && ris.acknowledged === 1) ? 1 : ((!value && ris && ris.acknowledged === 1) ? -1 : 0);
let state = (value && ris && ris.acknowledged) ? 1 : ((!value && ris && ris.acknowledged) ? -1 : 0);
const risreac = await Reaction.calcReactions(idapp, id, tab);
if (risreac) {