- fix: nModified è stato sostituito con modifiedCount

- .ok con .acknowledged
- coretto la chiamata per il REFRESH TOKEN !
This commit is contained in:
Surya Paolo
2025-03-14 10:55:37 +01:00
parent e04247b1b6
commit aeb83a512b
15 changed files with 41 additions and 240 deletions

View File

@@ -514,7 +514,7 @@ router.post('/settable', authenticate, async (req, res) => {
})
.then(async (risult) => {
let rec = null;
if (risult && risult.ok === 1) {
if (risult && risult.acknowledged === 1) {
rec = await mytable.findById(mytablerec._id).lean();
} else {
rec = risult;
@@ -990,7 +990,7 @@ async function upsertRecord(table, record, appId, newIdPage = null) {
record.idPage = newIdPage;
}
const modif = await table.updateOne({ _id: record._id }, { $set: { ...record, idapp: appId } });
wasModified = modif.nModified > 0;
wasModified = modif.modifiedCount > 0;
} else {
// Se sono sulla tabella mypages
if (table.modelName === 'MyPage') {