diff --git a/src/app/_interceptors/error.interceptor.ts b/src/app/_interceptors/error.interceptor.ts index a2fb8cc..31e3812 100644 --- a/src/app/_interceptors/error.interceptor.ts +++ b/src/app/_interceptors/error.interceptor.ts @@ -56,7 +56,7 @@ export class ErrorInterceptor implements HttpInterceptor { this.loggingService.sendErrorLevelMessage(errorMessage, this, { error: err }); switch (err.status) { case 401: // unauthorized - // this.router.navigateByUrl('/auth').then(); + this.router.navigateByUrl('/auth').then(); break; case 403: // forbidden alert('Access to resource is not allowed!'); diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 421f7b6..93e5328 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -7,7 +7,7 @@ const routes: Routes = [ { path: '', loadChildren: () => import('@pages/pages.module').then((m) => m.PagesModule), - canActivate: [], + canActivate: [AuthGuard], }, { path: '**', redirectTo: '', pathMatch: 'full' }, ];