versione 1.2.14 :

- aggiornati i file di configurazione, ENV e script non funzionanti., package.
- corretto custom-service-worker.js con CORS
- ottimizzato il server, la chiamata Load iniziale (senza promise, con async/await).
This commit is contained in:
Surya Paolo
2025-03-12 21:03:02 +01:00
parent d106a59bb5
commit 7827e49760
19 changed files with 594 additions and 1549 deletions

View File

@@ -141,10 +141,10 @@ NewstosentSchema.statics.getlast = async function (idapp) {
const Newstosent = this;
try {
const mydoc = await Newstosent.find({ idapp }).sort({ datestartJob: -1 }).limit(1);
return mydoc[0]._doc;
const mydoc = await Newstosent.findOne({ idapp }).sort({ datestartJob: -1 }).lean();
return mydoc || null;
} catch (e) {
return null
return null;
}
};