diff --git a/src/app/profile/profile.component.ts b/src/app/profile/profile.component.ts index 0b3b1d36c276ff97445d274268e12faa1ce09d7a..0a7e5aa9ddbb931f2de73e99f3361587b327be13 100644 --- a/src/app/profile/profile.component.ts +++ b/src/app/profile/profile.component.ts @@ -27,7 +27,7 @@ export class ProfileComponent implements OnInit { this.userProfile = profile; this.structures = []; profile.structuresLink.forEach((structureId) => { - this.structureService.getStructureWithOwners(structureId, profile).subscribe((s) => { + this.structureService.getStructureWithOwners(structureId, null).subscribe((s) => { this.structures.push(s); }); }); diff --git a/src/app/services/structure.service.ts b/src/app/services/structure.service.ts index d7653393c8c943000988b9b840a5a7a39311a11e..71f6417cc109db5f21c4ee221613a4c0328d78a1 100644 --- a/src/app/services/structure.service.ts +++ b/src/app/services/structure.service.ts @@ -191,7 +191,7 @@ export class StructureService { } public getStructureWithOwners(structureId: string, profile: User): Observable<StructureWithOwners> { - return this.http.post<any>(`${this.baseUrl}/${structureId}/withOwners`, { emailUser: profile.email }); + return this.http.post<any>(`${this.baseUrl}/${structureId}/withOwners`, { emailUser: profile?.email }); } public sendMailOnStructureError(structureId: string, content: string): Observable<any> {