From 7aedfe5ea798ea0c539b2f6dea783fef9d281796 Mon Sep 17 00:00:00 2001 From: Art Date: Fri, 17 Sep 2021 10:06:57 +0300 Subject: [PATCH] 126. Configure Guard (#15) --- support-portal-frontend/src/app/app.module.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support-portal-frontend/src/app/app.module.ts b/support-portal-frontend/src/app/app.module.ts index fe28a54..76cc5f4 100644 --- a/support-portal-frontend/src/app/app.module.ts +++ b/support-portal-frontend/src/app/app.module.ts @@ -6,6 +6,7 @@ import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http"; import {AuthenticationService} from "./service/authentication.service"; import {UserService} from "./service/user.service"; import {AuthInterceptor} from "./interceptor/auth.interceptor"; +import {AuthenticationGuard} from "./guard/authentication.guard"; @NgModule({ declarations: [ @@ -15,7 +16,7 @@ import {AuthInterceptor} from "./interceptor/auth.interceptor"; BrowserModule, HttpClientModule ], - providers: [AuthenticationService, UserService, + providers: [AuthenticationGuard, AuthenticationService, UserService, {provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true} ], bootstrap: [AppComponent]