- fix notifiche

This commit is contained in:
Surya Paolo
2024-05-10 01:08:49 +02:00
parent 1d5002ea0f
commit 87808caadf
3 changed files with 11 additions and 6 deletions

View File

@@ -161,7 +161,7 @@ sendNotifSchema.statics.getRecNotif = function (id) {
};
sendNotifSchema.statics.findAllNotifByUsernameIdAndIdApp = function (username, lastdataread, idapp, limitrecord, qualinotif) {
sendNotifSchema.statics.findAllNotifByUsernameIdAndIdApp = function (username, lastdataread, idapp, limitrecord, qualinotif, arroptionfilter) {
const SendNotif = this;
if (!lastdataread)
@@ -179,7 +179,10 @@ sendNotifSchema.statics.findAllNotifByUsernameIdAndIdApp = function (username, l
} else {
arrfilter.push({ typedir: { $ne: shared_consts.TypeNotifs.TYPEDIR_CIRCUITS } });
}
}
if (arroptionfilter) {
arrfilter = [...arrfilter, ...arroptionfilter];
}
return SendNotif.find({