- fix: nModified è stato sostituito con modifiedCount
- .ok con .acknowledged - coretto la chiamata per il REFRESH TOKEN !
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user