diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index 6571719..abf0d67 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -52,10 +52,7 @@ const routes: Routes = [ { path: 'institution-popup', component: InstitutionPopupComponent, - }, - { - path: 'institution-popup/:institution-popup', - component: InstitutionPopupComponent, + canActivate: [AuthenticationGuard] }, { path: 'login', diff --git a/frontend/src/app/authentication-guard.guard.ts b/frontend/src/app/authentication-guard.guard.ts index 87581d9..5bad75f 100644 --- a/frontend/src/app/authentication-guard.guard.ts +++ b/frontend/src/app/authentication-guard.guard.ts @@ -31,7 +31,7 @@ export class AuthenticationGuard implements CanActivate, CanActivateChild, CanLo private authenticate(): boolean { if (!this.authService.isUserLoggedIn()) { - this.router.navigateByUrl("/institution-popup"); + this.router.navigateByUrl("/login"); return false; } else { return true;