- passato mongoose da versione 7 a versione 8

This commit is contained in:
Surya Paolo
2025-03-03 01:07:00 +01:00
parent 0a4cea94ae
commit 8363d65456
7 changed files with 36 additions and 110 deletions

View File

@@ -116,10 +116,10 @@ const sendNotifSchema = new Schema({
},
});
sendNotifSchema.index({ idapp: 1 });
/*sendNotifSchema.index({ idapp: 1 });
sendNotifSchema.index({ typedir: 1 });
sendNotifSchema.index({ typeid: 1 });
sendNotifSchema.index({ sender: 1 });
sendNotifSchema.index({ sender: 1 });*/
sendNotifSchema.index({ idapp: 1, typedir: 1, typeid: 1, status: 1, sender: 1 });
@@ -1383,9 +1383,4 @@ sendNotifSchema.statics.checkIfAlreadyExist = async function (idapp, tag, idpost
const SendNotif = mongoose.model('SendNotif', sendNotifSchema);
SendNotif.createIndexes()
.then(() => { })
.catch((err) => { throw err; });
module.exports = { SendNotif: SendNotif };