Skip to content

Commit

Permalink
feat: add necessary guards on routing modules
Browse files Browse the repository at this point in the history
  • Loading branch information
oriolagobat committed Dec 13, 2023
1 parent 979c942 commit 7931dde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/app/pages/logout/logout-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { LogoutPage } from './logout.page';
import { userGuard } from '../../guards/user.guard';

const routes: Routes = [
{
path: '',
component: LogoutPage,
canActivate: [userGuard],
},
];

Expand Down
2 changes: 2 additions & 0 deletions app/src/app/pages/profile/profile-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { ProfilePage } from './profile-get/profile.page';
import { userGuard } from '../../guards/user.guard';

const routes: Routes = [
{
path: '',
component: ProfilePage,
canActivate: [userGuard],
},
];

Expand Down
2 changes: 2 additions & 0 deletions app/src/app/pages/reservations/reservations-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { ReservationsPage } from './reservations.page';
import { userGuard } from '../../guards/user.guard';

const routes: Routes = [
{
path: '',
component: ReservationsPage,
canActivate: [userGuard],
},
];

Expand Down

0 comments on commit 7931dde

Please sign in to comment.