|
@@ -58,7 +58,7 @@ export class AuthService {
|
|
|
//debugger;
|
|
//debugger;
|
|
|
console.log("url ========",this.apiUrl);
|
|
console.log("url ========",this.apiUrl);
|
|
|
|
|
|
|
|
- return this.http.post<Token>(`https://api-preprod.foodgame.fr/api/auth/login`, credentials)
|
|
|
|
|
|
|
+ return this.http.post<Token>('https://api-preprod.foodgame.fr/api/auth/login', credentials)
|
|
|
.pipe(map(token => {
|
|
.pipe(map(token => {
|
|
|
// store jwt token in local storage
|
|
// store jwt token in local storage
|
|
|
localStorage.setItem('token', JSON.stringify(token));
|
|
localStorage.setItem('token', JSON.stringify(token));
|
|
@@ -83,7 +83,7 @@ export class AuthService {
|
|
|
//debugger;
|
|
//debugger;
|
|
|
console.log("url ========",this.apiUrl);
|
|
console.log("url ========",this.apiUrl);
|
|
|
|
|
|
|
|
- return this.http.post<Token>(`https://api-preprod.foodgame.fr/api/auth/admin`, credentials)
|
|
|
|
|
|
|
+ return this.http.post<Token>('https://api-preprod.foodgame.fr/api/auth/admin', credentials)
|
|
|
.pipe(map(token => {
|
|
.pipe(map(token => {
|
|
|
// store jwt token in local storage
|
|
// store jwt token in local storage
|
|
|
localStorage.setItem('token', JSON.stringify(token));
|
|
localStorage.setItem('token', JSON.stringify(token));
|
|
@@ -97,7 +97,7 @@ export class AuthService {
|
|
|
// iscription get token on login
|
|
// iscription get token on login
|
|
|
signUP(data): Observable<Token> {
|
|
signUP(data): Observable<Token> {
|
|
|
|
|
|
|
|
- return this.http.post<Token>(`https://api-preprod.foodgame.fr/api/auth/signup`, data)
|
|
|
|
|
|
|
+ return this.http.post<Token>('https://api-preprod.foodgame.fr/api/auth/signup', data)
|
|
|
.pipe(map(token => {
|
|
.pipe(map(token => {
|
|
|
// store jwt token in local storage
|
|
// store jwt token in local storage
|
|
|
localStorage.setItem('token', JSON.stringify(token));
|
|
localStorage.setItem('token', JSON.stringify(token));
|