- 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:
@@ -140,9 +140,8 @@ NewstosentSchema.statics.findAllIdApp = async function (idapp) {
|
||||
|
||||
// Extract only the Teacher where in the users table the field permissions is set 'Teacher' bit.
|
||||
|
||||
return await Newstosent.find(myfind, (err, arrrec) => {
|
||||
return arrrec
|
||||
});
|
||||
return await tools.findAllQueryIdApp(this, myfind);
|
||||
|
||||
};
|
||||
|
||||
NewstosentSchema.statics.getlast = async function (idapp) {
|
||||
@@ -170,8 +169,9 @@ NewstosentSchema.statics.isActivated = async function (_id) {
|
||||
|
||||
const Newstosent = mongoose.model('Newstosent', NewstosentSchema);
|
||||
|
||||
Newstosent.createIndexes((err) => {
|
||||
if (err) throw err;
|
||||
});
|
||||
Newstosent.createIndexes()
|
||||
.then(() => { })
|
||||
.catch((err) => { throw err; });
|
||||
|
||||
|
||||
module.exports = { Newstosent };
|
||||
|
||||
Reference in New Issue
Block a user