Skip to content
Snippets Groups Projects
Commit 17325772 authored by Antonin COQUET's avatar Antonin COQUET
Browse files

fix: add creation of ES document on apitc structure

parent 3d2e4f24
No related branches found
No related tags found
3 merge requests!96release V1.10.0,!83Dev,!77fix: add creation of ES document on apitc structure
......@@ -13,6 +13,7 @@ import { Address } from '../schemas/address.schema';
import { UsersService } from '../../users/users.service';
import { ApticCatalog } from '../schemas/aptic-catalog.schema';
import { CategoriesFormationsService } from '../../categories/services/categories-formations.service';
import { StructuresSearchService } from './structures-search.service';
@Injectable()
export class ApticStructuresService {
......@@ -20,6 +21,7 @@ export class ApticStructuresService {
private readonly httpService: HttpService,
private readonly userService: UsersService,
private readonly categoriesFormationsService: CategoriesFormationsService,
private structuresSearchService: StructuresSearchService,
@InjectModel(Structure.name) private structureModel: Model<StructureDocument>
) {}
......@@ -92,6 +94,7 @@ export class ApticStructuresService {
createdStructure.socialAndProfessional = await this.setModules(structure, 'socialAndProfessional');
createdStructure.digitalCultureSecurity = await this.setModules(structure, 'digitalCultureSecurity');
createdStructure.save();
this.structuresSearchService.indexStructure(createdStructure);
// Send admin weird structure mail
this.verifyDuplication(createdStructure);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment