From 92fe11b18b839881629feaafddfab758e783e4e9 Mon Sep 17 00:00:00 2001 From: George Kalampokis Date: Thu, 25 Jun 2020 13:35:17 +0300 Subject: [PATCH] When logging in remove the cookie consent popup --- dmp-frontend/src/app/core/services/auth/auth.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dmp-frontend/src/app/core/services/auth/auth.service.ts b/dmp-frontend/src/app/core/services/auth/auth.service.ts index 9b61514c4..af4604994 100644 --- a/dmp-frontend/src/app/core/services/auth/auth.service.ts +++ b/dmp-frontend/src/app/core/services/auth/auth.service.ts @@ -14,6 +14,7 @@ import { environment } from 'environments/environment'; import { Observable, of as observableOf, throwError as observableThrowError } from 'rxjs'; import { catchError, map, takeUntil } from 'rxjs/operators'; import { ConfigurationService } from '../configuration/configuration.service'; +import { CookieService } from 'ngx-cookie-service'; @Injectable() export class AuthService extends BaseService { @@ -26,7 +27,8 @@ export class AuthService extends BaseService { private language: TranslateService, private router: Router, private uiNotificationService: UiNotificationService, - private configurationService: ConfigurationService + private configurationService: ConfigurationService, + private cookieService: CookieService ) { super(); @@ -73,6 +75,7 @@ export class AuthService extends BaseService { return this.http.post(url, loginInfo, { headers: this.headers }).pipe( map((res: any) => { const principal = this.current(res.payload); + this.cookieService.set('cookiesConsent', 'true', 356); //this.loginContextSubject.next(true); return principal; }), @@ -89,6 +92,7 @@ export class AuthService extends BaseService { return this.http.post(url, credentials, { headers: this.headers }).pipe( map((res: any) => { const principal = this.current(res.payload); + this.cookieService.set('cookiesConsent', 'true', 356); //this.loginContextSubject.next(true); return principal; }),