When logging in remove the cookie consent popup

This commit is contained in:
George Kalampokis 2020-06-25 13:35:17 +03:00
parent 55d3feb4e3
commit 92fe11b18b
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}),