diff --git a/src/structures/services/structures-search.service.ts b/src/structures/services/structures-search.service.ts index f334926a9fce19a953801764b1812f906692557d..e809c58f9f53f9e0d1291df3ee28c7f163cb212c 100644 --- a/src/structures/services/structures-search.service.ts +++ b/src/structures/services/structures-search.service.ts @@ -59,7 +59,7 @@ export class StructuresSearchService { index: this.index, body: { from: 0, - size: 30, + size: 200, query: { query_string: { analyze_wildcard: 'true', diff --git a/src/structures/services/structures.service.ts b/src/structures/services/structures.service.ts index 8b98603ab518083513dd8553994e794e897592a0..ae5c8dd485d8e9897c39b1c8b45c9efe51b46966 100644 --- a/src/structures/services/structures.service.ts +++ b/src/structures/services/structures.service.ts @@ -58,6 +58,7 @@ export class StructuresService { await this.structureModel .find({ _id: { $in: ids }, + $and: [{ deletedAt: { $exists: false }, accountVerified: true }], }) .exec() ).sort((a, b) => ids.indexOf(a.id) - ids.indexOf(b.id)); @@ -160,7 +161,7 @@ export class StructuresService { ); return structures; } - + public async findAllFormated( formationCategories: CategoriesFormations[], accompagnementCategories: CategoriesAccompagnement[], @@ -353,12 +354,14 @@ export class StructuresService { keyList.push({ [key]: { $elemMatch: { $eq: value } }, deletedAt: { $exists: false }, + accountVerified: true, }); if (selected && selected.length > 0) { for (const val of selected) { keyList.push({ [val.text]: { $elemMatch: { $eq: val.id } }, deletedAt: { $exists: false }, + accountVerified: true, }); } }