diff --git a/src/app/form/form.component.ts b/src/app/form/form.component.ts index f8fd2d78f9d45dbdfcf5cf7dd8699c3fa3ea90fd..a5d2ff581bab802f8018e6697648fa4db28b0914 100644 --- a/src/app/form/form.component.ts +++ b/src/app/form/form.component.ts @@ -256,7 +256,7 @@ export class FormComponent implements OnInit { this.structureService .claimStructureWithAccount(this.structureId, this.profile.email) .subscribe((structuresLinked) => { - this.profile.structuresLink = structuresLinked; + this.profile.pendingStructuresLink = structuresLinked; this.profileService.setProfile(this.profile); this.closeEvent.emit(this.structureForm.value); }); diff --git a/src/app/models/user.model.ts b/src/app/models/user.model.ts index a60ee2247268e621cfe6a30259a4603c4d9fdd93..c702ff9d357c1f087a9964f42f8764c66041a340 100644 --- a/src/app/models/user.model.ts +++ b/src/app/models/user.model.ts @@ -6,4 +6,5 @@ export class User { role: number; validationToken: string; structuresLink: number[]; + pendingStructuresLink: number[]; } diff --git a/src/app/profile/services/profile.service.ts b/src/app/profile/services/profile.service.ts index 760d18a8e3ab3d51c3b9873631db7eb42327b37a..eba09ef410d3d3cd66b25c806d4f73f921f71eee 100644 --- a/src/app/profile/services/profile.service.ts +++ b/src/app/profile/services/profile.service.ts @@ -40,7 +40,7 @@ export class ProfileService { } public createUserandLinkStructure(id: number, body: User): Observable<User> { - body.structuresLink = [id]; + body.pendingStructuresLink = [id]; return this.http.post<any>(`${this.baseUrl}`, body); }