Merge branch 'dev' into aline
This commit is contained in:
commit
f330dc901a
20 changed files with 12708 additions and 1754 deletions
|
|
@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
|
|||
import { map, Observable } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Membre } from '../models/membre';
|
||||
import { Team } from '../models/team';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
|
@ -23,6 +24,7 @@ export class AuthService {
|
|||
return this.http.post(`${this.apiUrl}/membres/sign-up`, membre);
|
||||
}
|
||||
|
||||
|
||||
signin(email: string, password: string): Observable<any> {
|
||||
const body = {
|
||||
email: email,
|
||||
|
|
@ -35,7 +37,7 @@ export class AuthService {
|
|||
// - pour pouvoir stocker dans le localstorage notre accesstoken
|
||||
// - Sous la clé "TOKEN-LBP"
|
||||
|
||||
return this.http.post(`${this.apiUrl}/login`, body).pipe(
|
||||
return this.http.post(`${this.apiUrl}/membres/sign-in`, body).pipe(
|
||||
map((x: any) => {
|
||||
console.log('Service : ', x.accessToken);
|
||||
// Modification à faire ici
|
||||
|
|
@ -45,14 +47,26 @@ export class AuthService {
|
|||
);
|
||||
}
|
||||
|
||||
forgotPassword(email: string, password: string): Observable<any> {
|
||||
forgotPassword(email: string): Observable<any> {
|
||||
const body = {
|
||||
email: email,
|
||||
password: password,
|
||||
};
|
||||
|
||||
console.log('Mon body : ', body);
|
||||
|
||||
return this.http.post(`${this.apiUrl}/forgot-psw`, body);
|
||||
return this.http.post(`${this.apiUrl}/membres/forgot-password`, body);
|
||||
}
|
||||
|
||||
|
||||
creationTeam(team: Team): Observable<any> {
|
||||
console.log(team);
|
||||
|
||||
return this.http.post(`${this.apiUrl}/creation-compte`, team);
|
||||
}
|
||||
|
||||
|
||||
|
||||
addMember(membre: Membre): Observable<any> {
|
||||
console.log(membre);
|
||||
|
||||
return this.http.post(`${this.apiUrl}/tableau-de-bord`, membre);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue