Fare procedura per cambiare gli username in giro nelle varie tabelle

This commit is contained in:
Surya Paolo
2022-12-23 00:36:35 +01:00
parent 786843f115
commit 7e1407cbb1
8 changed files with 352 additions and 274 deletions

View File

@@ -74,7 +74,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.count(myfind);
return await MailingList.countDocuments(myfind);
};
MailingListSchema.statics.isOk = async function (idapp, iduser, idmailinglist) {
@@ -84,7 +84,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.count(myfind) > 0;
return await MailingList.countDocuments(myfind) > 0;
};
MailingListSchema.statics.findAllIdApp = async function (idapp) {