Skip to content
Snippets Groups Projects
Commit 22c1c523 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix(structure): last member can now delete himself from structure

parent 57b8bdc9
No related branches found
No related tags found
2 merge requests!180release V1.10.0,!178release V1.10.0
...@@ -27,7 +27,7 @@ export class ProfileComponent implements OnInit { ...@@ -27,7 +27,7 @@ export class ProfileComponent implements OnInit {
this.userProfile = profile; this.userProfile = profile;
this.structures = []; this.structures = [];
profile.structuresLink.forEach((structureId) => { profile.structuresLink.forEach((structureId) => {
this.structureService.getStructureWithOwners(structureId, profile).subscribe((s) => { this.structureService.getStructureWithOwners(structureId, null).subscribe((s) => {
this.structures.push(s); this.structures.push(s);
}); });
}); });
......
...@@ -191,7 +191,7 @@ export class StructureService { ...@@ -191,7 +191,7 @@ export class StructureService {
} }
public getStructureWithOwners(structureId: string, profile: User): Observable<StructureWithOwners> { 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> { public sendMailOnStructureError(structureId: string, content: string): Observable<any> {
......
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