- Aggiornato node.js alla versione 22.18.1

- Aggiornato tutti i pacchetti del server all'ultima versione.
- passato mongoose da versione 5 a versione 6
This commit is contained in:
Surya Paolo
2025-03-03 00:46:08 +01:00
parent 45d06b0923
commit 53a70a1c96
120 changed files with 3385 additions and 6065 deletions

View File

@@ -98,9 +98,7 @@ AccountSchema.statics.findAllIdApp = async function (idapp) {
const myfind = { idapp, deleted: false };
return await Account.find(myfind, (err, arrrec) => {
return arrrec;
});
return await Account.find(myfind).lean();
};
AccountSchema.pre('save', async function (next) {
@@ -764,8 +762,8 @@ AccountSchema.statics.updateSaldoAndTransato_AllAccounts = async function (idapp
const Account = mongoose.model('Account', AccountSchema);
Account.createIndexes((err) => {
if (err) throw err;
});
Account.createIndexes()
.then(() => { })
.catch((err) => { throw err; });
module.exports = { Account };