Skip to content

Commit

Permalink
feat: fix routing
Browse files Browse the repository at this point in the history
  • Loading branch information
holdan-8 committed Apr 9, 2024
1 parent 39432c3 commit 398d471
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions frontend/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ const routes: Routes = [
{
path: 'institution-popup',
component: InstitutionPopupComponent,
},
{
path: 'institution-popup/:institution-popup',
component: InstitutionPopupComponent,
canActivate: [AuthenticationGuard]
},
{
path: 'login',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/authentication-guard.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 398d471

Please sign in to comment.