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:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user