Doppia modalità di Registrazione con lista extra utenti

This commit is contained in:
Paolo Arena
2020-01-13 23:52:51 +01:00
parent 8f784df4fa
commit e23a3a792e
25 changed files with 829 additions and 163 deletions

View File

@@ -72,7 +72,7 @@ MailingListSchema.statics.getnumSent = async function (idapp, idmailinglist) {
// Extract only the Teacher where in the users table the field permissions is set 'Teacher' bit.
return await MailingList.find(myfind).count();
return await MailingList.countDocuments(myfind);
};
MailingListSchema.statics.isOk = async function (idapp, iduser, idmailinglist) {
@@ -82,7 +82,7 @@ MailingListSchema.statics.isOk = async function (idapp, iduser, idmailinglist) {
// Extract only the Teacher where in the users table the field permissions is set 'Teacher' bit.
return await MailingList.find(myfind).count() > 0;
return await MailingList.countDocuments(myfind) > 0;
};
MailingListSchema.statics.findAllIdApp = async function (idapp) {