Revert auth guard handler.

This commit is contained in:
Spencer Ofwiti 2021-06-25 11:03:00 +03:00
parent 599ffe9079
commit f5c69cc574
2 changed files with 2 additions and 2 deletions

View File

@ -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!');

View File

@ -7,7 +7,7 @@ const routes: Routes = [
{
path: '',
loadChildren: () => import('@pages/pages.module').then((m) => m.PagesModule),
canActivate: [],
canActivate: [AuthGuard],
},
{ path: '**', redirectTo: '', pathMatch: 'full' },
];