formation hace 3 años
padre
commit
2892b85c02

+ 1 - 1
angular-client/src/app/components/login/login.component.ts

@@ -78,7 +78,7 @@ export class LoginComponent implements OnInit {
           this.router.navigate(['/auth']);
           setTimeout(() => {
             document.location.reload()
-          },100)
+          },1000)
       },
       err => {
           this.loading = false;

+ 1 - 1
angular-client/src/app/components/shared/navbar/navbar.component.html

@@ -23,7 +23,7 @@
       <a class="navbtn" mat-button routerLink="/emailing" [hidden]="!isAdmin">Emailing</a>
       <a class="navbtn" mat-button routerLink="/assistance" [hidden]="!isAdmin">Assistance</a>
       <!-- <a class="navbtn" mat-button routerLink="/users" [hidden]="!isAdmin">Employés</a> -->
-      <a class="navbtn" mat-button routerLink="/contact" >Contact</a>
+      <a class="navbtn" mat-button routerLink="/contact" *ngIf="!isLogged && !isAdmin" >Contact</a>
       <a class="navbtn" mat-icon-button color="basic" aria-label="" (click)="logOut()" *ngIf="isLogged">
         <mat-icon>power_settings_new</mat-icon>
       </a>

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

@@ -133,6 +133,9 @@ resetPassword(data): Observable<any> {
     localStorage.removeItem('user');
     this.user_infoSubject.next(null);
     this.router.navigate(['/login']);
+    setTimeout(() => {
+      document.location.reload()
+    },1000)
   }
 
   // get info user 

+ 4 - 4
build/docker/apache/apache.conf

@@ -1,6 +1,6 @@
 <VirtualHost *:80>
-   ServerName angular-preprod.foodgame.fr
-   ServerAlias angular-preprod.foodgame.fr
+   ServerName angular-prod.foodgame.fr
+   ServerAlias angular-prod.foodgame.fr
    #ProxyPreserveHost On
    #ProxyRequests Off
    #ProxyPass        / http://127.0.0.1:8080/
@@ -20,8 +20,8 @@
 
 <VirtualHost *:443>
    DocumentRoot /var/www/html
-   ServerName angular-preprd.foodgame.fr
-   ServerAlias angular-preprod.foodgame.fr
+   ServerName angular-prod.foodgame.fr
+   ServerAlias angular-prod.foodgame.fr
    #SSLEnable
    #SSLEngine ON
    #SSLCertificateFile path/to/server.crt

+ 1 - 1
express-server/routes/restaurant.js

@@ -8,7 +8,7 @@ const RestaurantController = require('../controllers/restaurant');
 
 
 //get all restaurants
-router.get("/", authorize([Role.Employee,Role.Admin]), RestaurantController.getAllRestaurants);
+router.get("/", RestaurantController.getAllRestaurants);
 
 //post restaurants
 router.post("/", authorize([Role.Admin]), RestaurantController.postAllRestaurants);