Skip to content
Snippets Groups Projects
Commit e0148681 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

fix: create structure dto

parent 4fe8453f
Branches
Tags
4 merge requests!418V2.1.0,!400V2.0,!339fix dto variable,!230V2.0
......@@ -193,5 +193,8 @@
}
}
}
},
"cli": {
"analytics": false
}
}
......@@ -66,6 +66,7 @@ export class Structure {
public alreadySelected? = false;
public isClaimed?: boolean = null;
public idCNFS?: string;
constructor(obj?: any) {
Object.assign(this, obj, {
......
......
......@@ -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> {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment