henri carmelo 9 kuukautta sitten
vanhempi
commit
fbabc29098

+ 5 - 5
angular-client/src/app/services/auth.service.ts

@@ -71,7 +71,7 @@ export class AuthService {
   }
 
   signInAdmin(credentials): Observable<Token> {
-    return this.http.post<Token>(`${this.apiUrl}/api/auth/admin`, credentials)
+    return this.http.post<Token>(`https://api-preprod.foodgame.fr/api/auth/admin`, credentials)
       .pipe(map(token => {
         this.storageService.setItem('token', JSON.stringify(token));
         this.tokenSubject.next(token);
@@ -80,7 +80,7 @@ export class AuthService {
   }
 
   signUP(data): Observable<Token> {
-    return this.http.post<Token>(`${this.apiUrl}/api/auth/signup`, data)
+    return this.http.post<Token>(`https://api-preprod.foodgame.fr/api/auth/signup`, data)
       .pipe(map(token => {
         this.storageService.setItem('token', JSON.stringify(token));
         this.tokenSubject.next(token);
@@ -89,11 +89,11 @@ export class AuthService {
   }
 
   lostPassword(email): Observable<any> {
-    return this.http.put<any>(`${this.apiUrl}/api/auth/forgot-password`, email);
+    return this.http.put<any>(`https://api-preprod.foodgame.fr/api/auth/forgot-password`, email);
   }
 
   resetPassword(data): Observable<any> {
-    return this.http.put<any>(`${this.apiUrl}/api/auth/reset-password`, data);
+    return this.http.put<any>(`https://api-preprod.foodgame.fr/api/auth/reset-password`, data);
   }
 
   public isLoggedIn() {
@@ -123,7 +123,7 @@ export class AuthService {
 
   getUserInfo(): Observable<User> {
     let decodedToken: payloadToken = jwt_decode(this.tokenSubject.value.token); 
-    return this.http.get<User>(`${this.apiUrl}/api/users/${decodedToken.userId}`)
+    return this.http.get<User>(`https://api-preprod.foodgame.fr/api/users/${decodedToken.userId}`)
       .pipe(map(user => {
         this.storageService.setItem('user', JSON.stringify(user));
         this.user_infoSubject.next(user);

+ 1 - 1
angular-client/src/app/services/email.service.ts

@@ -16,7 +16,7 @@ export class EmailService {
 
 // send email 
 sendEmail(data : Email, email: string, isgain: string, isactiive: string): Observable<Email> {
-  return this.http.post<Email>(`${this.apiUrl}/api/emails/send?email=${email}&isgain=${isgain}&isactive=${isactiive}`,data);
+  return this.http.post<Email>(`https://api-preprod.foodgame.fr/api/emails/send?email=${email}&isgain=${isgain}&isactive=${isactiive}`,data);
 }
 
 

+ 1 - 1
angular-client/src/app/services/restaurants.service.ts

@@ -16,7 +16,7 @@ export class RestaurantsService {
 
   // get users
 getRestaurants(): Observable<Restaurant[]> {
-  return this.http.get<Restaurant[]>(`${this.apiUrl}/api/restaurants`);
+  return this.http.get<Restaurant[]>(`https://api-preprod.foodgame.fr/api/restaurants`);
 }