Lista Doni Navi
This commit is contained in:
8
src/server/models/mailinglist.js
Normal file → Executable file
8
src/server/models/mailinglist.js
Normal file → Executable file
@@ -45,7 +45,9 @@ const MailingListSchema = new Schema({
|
||||
});
|
||||
|
||||
MailingListSchema.statics.getFieldsForSearch = function () {
|
||||
return ['name', 'surname', 'email']
|
||||
return [{ field: 'name', type: tools.FieldType.string },
|
||||
{ field: 'surname', type: tools.FieldType.string },
|
||||
{ field: 'email', type: tools.FieldType.string }]
|
||||
};
|
||||
|
||||
MailingListSchema.statics.executeQueryTable = function (idapp, params) {
|
||||
@@ -56,7 +58,7 @@ MailingListSchema.statics.executeQueryTable = function (idapp, params) {
|
||||
MailingListSchema.statics.findAllIdAppSubscribed = function (idapp) {
|
||||
const MailingList = this;
|
||||
|
||||
const myfind = { idapp, statesub: true, wrongerr: {$ne: true} };
|
||||
const myfind = { idapp, statesub: true, wrongerr: { $ne: true } };
|
||||
|
||||
// Extract only the Teacher where in the users table the field permissions is set 'Teacher' bit.
|
||||
|
||||
@@ -78,7 +80,7 @@ MailingListSchema.statics.getnumSent = async function (idapp, idmailinglist) {
|
||||
MailingListSchema.statics.isOk = async function (idapp, iduser, idmailinglist) {
|
||||
const MailingList = this;
|
||||
|
||||
const myfind = { idapp, _id: iduser, statesub: true, lastid_newstosent: {$ne: idmailinglist } };
|
||||
const myfind = { idapp, _id: iduser, statesub: true, lastid_newstosent: { $ne: idmailinglist } };
|
||||
|
||||
// Extract only the Teacher where in the users table the field permissions is set 'Teacher' bit.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user