Notification New Group

This commit is contained in:
paoloar77
2022-07-28 23:27:51 +02:00
parent 7cda5dbb8b
commit 241e4255d4
9 changed files with 63 additions and 32 deletions

View File

@@ -235,10 +235,12 @@ MyGroupSchema.statics.getInfoGroupByGroupname = async function(idapp, groupname)
const whatToShow = this.getWhatToShow(idapp, groupname);
return MyGroup.findOne({
const rec = await MyGroup.findOne({
idapp,
groupname,
}, whatToShow).then((rec) => !!rec ? rec._doc : null);
}, whatToShow).lean();
return rec;
};