When logging in remove the cookie consent popup
This commit is contained in:
parent
55d3feb4e3
commit
92fe11b18b
|
@ -14,6 +14,7 @@ import { environment } from 'environments/environment';
|
||||||
import { Observable, of as observableOf, throwError as observableThrowError } from 'rxjs';
|
import { Observable, of as observableOf, throwError as observableThrowError } from 'rxjs';
|
||||||
import { catchError, map, takeUntil } from 'rxjs/operators';
|
import { catchError, map, takeUntil } from 'rxjs/operators';
|
||||||
import { ConfigurationService } from '../configuration/configuration.service';
|
import { ConfigurationService } from '../configuration/configuration.service';
|
||||||
|
import { CookieService } from 'ngx-cookie-service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthService extends BaseService {
|
export class AuthService extends BaseService {
|
||||||
|
@ -26,7 +27,8 @@ export class AuthService extends BaseService {
|
||||||
private language: TranslateService,
|
private language: TranslateService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private uiNotificationService: UiNotificationService,
|
private uiNotificationService: UiNotificationService,
|
||||||
private configurationService: ConfigurationService
|
private configurationService: ConfigurationService,
|
||||||
|
private cookieService: CookieService
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
@ -73,6 +75,7 @@ export class AuthService extends BaseService {
|
||||||
return this.http.post(url, loginInfo, { headers: this.headers }).pipe(
|
return this.http.post(url, loginInfo, { headers: this.headers }).pipe(
|
||||||
map((res: any) => {
|
map((res: any) => {
|
||||||
const principal = this.current(res.payload);
|
const principal = this.current(res.payload);
|
||||||
|
this.cookieService.set('cookiesConsent', 'true', 356);
|
||||||
//this.loginContextSubject.next(true);
|
//this.loginContextSubject.next(true);
|
||||||
return principal;
|
return principal;
|
||||||
}),
|
}),
|
||||||
|
@ -89,6 +92,7 @@ export class AuthService extends BaseService {
|
||||||
return this.http.post(url, credentials, { headers: this.headers }).pipe(
|
return this.http.post(url, credentials, { headers: this.headers }).pipe(
|
||||||
map((res: any) => {
|
map((res: any) => {
|
||||||
const principal = this.current(res.payload);
|
const principal = this.current(res.payload);
|
||||||
|
this.cookieService.set('cookiesConsent', 'true', 356);
|
||||||
//this.loginContextSubject.next(true);
|
//this.loginContextSubject.next(true);
|
||||||
return principal;
|
return principal;
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue