creation-team connection back ok

This commit is contained in:
Sana EL HIRI 2022-01-21 12:56:22 +01:00
parent 0b51c771ce
commit 50f5b00b52
6 changed files with 14 additions and 22 deletions

5
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#4950a1"
}
}

View File

@ -4,9 +4,6 @@ export interface Membre {
email: string;
password: string;
dateNaissance: Date;
profil: boolean;
roleList: string[];
passwordConfirm: string;
roleList: string[];
}

View File

@ -1,2 +1,7 @@
<app-header></app-header>
<app-side-bar></app-side-bar>
<div class="d-flex justify-content-center">
<button button type="button" class="btn btn-primary btn-lg"
routerLink="../creation-team"
routerLinkActive="active-custom">Créer ma team</button>
</div>

View File

@ -67,7 +67,6 @@ export class PageAddMemberComponent implements OnInit {
email: emailValue,
password: passwordValue,
dateNaissance: dateNaissanceValue,
profil: profilValue,
passwordConfirm: passwordConfirmValue,
roleList: ["ROLE_PARENT"]
};

View File

@ -25,7 +25,7 @@ export class PageSignupComponent implements OnInit {
}
ngOnInit(): void {
// *********************************penser a changer group car déprécié********************************
// *********************************pensser a changer group car déprécié********************************
this.signupForm = this.fb.group(
{
firstNameFc: new FormControl('', [Validators.required]),
@ -61,30 +61,16 @@ export class PageSignupComponent implements OnInit {
const passwordValue = this.signupForm.value['passwordFc'];
const dateNaissanceValue = this.signupForm.value['dateNaissanceFc'];
const passwordConfirmValue = this.signupForm.value['passwordConfirmFc'];
const roleValue = ['ROLE_PARENT'];
const membre: Membre = {
prenom: prenomValue,
nom: nomValue,
prenom: prenomValue,
email: emailValue,
password: passwordValue,
dateNaissance: dateNaissanceValue,
passwordConfirm: passwordConfirmValue,
roleList: roleValue,
const teamValue = '';
const membre: Membre = {
nom: firstNameValue,
prenom: lastNameValue,
email: emailValue,
password: passwordValue,
dateNaissance: dateNaissanceValue,
profil: profilValue,
passwordConfirm: passwordConfirmValue,
roleList: ["ROLE_PARENT"]
};
if (membre.email !== '' && membre.password !== '') {

View File

@ -58,7 +58,7 @@ export class AuthService {
creationTeam(team: Team): Observable<any> {
console.log(team);
return this.http.post(`${this.apiUrl}/creation-compte`, team);
return this.http.post(`${this.apiUrl}/teams/add`, team);
}