Ajout d'un membre

This commit is contained in:
Romain Verger 2022-03-07 13:48:33 +01:00
parent 1d165f68ba
commit 802fe74a29
1 changed files with 5 additions and 24 deletions

View File

@ -18,18 +18,12 @@ export class AuthService {
this.tokenKey = environment.tokenKey; this.tokenKey = environment.tokenKey;
} }
// signup(): Observable<any> { signup(newUser: User): Observable<any> {
// // const body = {
// // firstName: firstName,
// // lastName: lastName,
// // email: email,
// // password: password
// // };
// console.log("Mon nouvel utilisateur : ", newUser); console.log("Mon nouvel utilisateur : ", newUser);
return this.http.post(`${this.apiUrl}/signup`, newUser);
}
// return this.http.post(`${this.apiUrl}/register`, newUser);
// }
signin(email: string, password: string): Observable<any> { signin(email: string, password: string): Observable<any> {
const body = { const body = {
@ -39,9 +33,7 @@ export class AuthService {
console.log("Mon body : ", body); console.log("Mon body : ", body);
// Modifier cette partie ci-dessous :
// - pour pouvoir stocker dans le localstorage notre accesstoken
// - Sous la clé "TOKEN-SIMPLEAT"
return this.http.post(`${this.apiUrl}/signin`, body).pipe( return this.http.post(`${this.apiUrl}/signin`, body).pipe(
map((x: any) => { map((x: any) => {
@ -55,15 +47,4 @@ export class AuthService {
); );
} }
// forgotPassword(email: string, password: string): Observable<any> {
// const body = {
// email: email,
// password: password
// };
// console.log("Mon body : ", body);
// return this.http.post(`${this.apiUrl}/forgot-psw`, body);
// }
} }