From e0148681372d46b30a08a63795b54b91baaaf4a6 Mon Sep 17 00:00:00 2001
From: Bastien DUMONT <bdumont@grandlyon.com>
Date: Thu, 27 Oct 2022 08:00:45 +0000
Subject: [PATCH] fix: create structure dto

---
 angular.json                          | 3 +++
 src/app/models/structure.model.ts     | 1 +
 src/app/services/structure.service.ts | 6 ++++--
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/angular.json b/angular.json
index 432e248a5..49accd1a4 100644
--- a/angular.json
+++ b/angular.json
@@ -193,5 +193,8 @@
         }
       }
     }
+  },
+  "cli": {
+    "analytics": false
   }
 }
diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts
index 8841a553a..e410b00de 100644
--- a/src/app/models/structure.model.ts
+++ b/src/app/models/structure.model.ts
@@ -66,6 +66,7 @@ export class Structure {
 
   public alreadySelected? = false;
   public isClaimed?: boolean = null;
+  public idCNFS?: string;
 
   constructor(obj?: any) {
     Object.assign(this, obj, {
diff --git a/src/app/services/structure.service.ts b/src/app/services/structure.service.ts
index 698064f0d..392599cf6 100644
--- a/src/app/services/structure.service.ts
+++ b/src/app/services/structure.service.ts
@@ -27,8 +27,10 @@ export class StructureService {
       .pipe(map((item: Structure) => new Structure(item)));
   }
   public createStructure(structure: Structure, profile: User): Observable<Structure> {
-    const idUser = profile.email;
-    return this.http.post(`${this.baseUrl}`, { structure, idUser }).pipe(map((item: Structure) => new Structure(item)));
+    const userEmail = profile.email;
+    return this.http
+      .post(`${this.baseUrl}`, { structure, userEmail })
+      .pipe(map((item: Structure) => new Structure(item)));
   }
 
   public editStructure(structure: Partial<Structure>, structureId?: string): Observable<Structure> {
-- 
GitLab