File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 99 Store ,
1010} from '@ngrx/store' ;
1111import { TranslateService } from '@ngx-translate/core' ;
12- import { CookieAttributes } from 'js-cookie' ;
12+ import Cookies from 'js-cookie' ;
1313import {
1414 Observable ,
1515 of ,
@@ -492,7 +492,7 @@ export class AuthService {
492492
493493 // Set the cookie expire date
494494 const expires = new Date ( expireDate ) ;
495- const options : CookieAttributes = { expires : expires } ;
495+ const options : Cookies . CookieAttributes = { expires : expires } ;
496496
497497 // Save cookie with the token
498498 return this . storage . set ( TOKENITEM , token , options ) ;
@@ -580,7 +580,7 @@ export class AuthService {
580580
581581 // Set the cookie expire date
582582 const expires = new Date ( expireDate ) ;
583- const options : CookieAttributes = { expires : expires } ;
583+ const options : Cookies . CookieAttributes = { expires : expires } ;
584584 this . storage . set ( REDIRECT_COOKIE , url , options ) ;
585585 this . store . dispatch ( new SetRedirectUrlAction ( isNotUndefined ( url ) ? url : '' ) ) ;
586586 }
Original file line number Diff line number Diff line change 11import { Injectable } from '@angular/core' ;
2- import Cookies , { CookieAttributes } from 'js-cookie' ;
2+ import Cookies from 'js-cookie' ;
33
44import {
55 CookieService ,
@@ -9,13 +9,13 @@ import {
99@Injectable ( )
1010export class ClientCookieService extends CookieService implements ICookieService {
1111
12- public set ( name : string , value : any , options ?: CookieAttributes ) : void {
12+ public set ( name : string , value : any , options ?: Cookies . CookieAttributes ) : void {
1313 const toStore = typeof value === 'string' ? value : JSON . stringify ( value ) ;
1414 Cookies . set ( name , toStore , options ) ;
1515 this . updateSource ( ) ;
1616 }
1717
18- public remove ( name : string , options ?: CookieAttributes ) : void {
18+ public remove ( name : string , options ?: Cookies . CookieAttributes ) : void {
1919 Cookies . remove ( name , options ) ;
2020 this . updateSource ( ) ;
2121 }
Original file line number Diff line number Diff line change 11import { Injectable } from '@angular/core' ;
2- import { CookieAttributes } from 'js-cookie' ;
2+ import Cookies from 'js-cookie' ;
33import {
44 Observable ,
55 Subject ,
@@ -12,9 +12,9 @@ export interface ICookieService {
1212
1313 get ( name : string ) : any ;
1414
15- set ( name : string , value : any , options ?: CookieAttributes ) : void ;
15+ set ( name : string , value : any , options ?: Cookies . CookieAttributes ) : void ;
1616
17- remove ( name : string , options ?: CookieAttributes ) : void ;
17+ remove ( name : string , options ?: Cookies . CookieAttributes ) : void ;
1818}
1919
2020@Injectable ( )
@@ -28,12 +28,12 @@ export abstract class CookieService implements ICookieService {
2828 public abstract set (
2929 name : string ,
3030 value : any ,
31- options ?: CookieAttributes ,
31+ options ?: Cookies . CookieAttributes ,
3232 ) : void ;
3333
3434 public abstract remove (
3535 name : string ,
36- options ?: CookieAttributes ,
36+ options ?: Cookies . CookieAttributes ,
3737 ) : void ;
3838
3939 public abstract get ( name : string ) : any ;
Original file line number Diff line number Diff line change 22 Inject ,
33 Injectable ,
44} from '@angular/core' ;
5- import { CookieAttributes } from 'js-cookie' ;
5+ import Cookies from 'js-cookie' ;
66
77import { REQUEST } from '../../../express.tokens' ;
88import {
@@ -19,14 +19,14 @@ export class ServerCookieService extends CookieService implements ICookieService
1919 public set (
2020 name : string ,
2121 value : any ,
22- options ?: CookieAttributes ,
22+ options ?: Cookies . CookieAttributes ,
2323 ) : void {
2424 return ;
2525 }
2626
2727 public remove (
2828 name : string ,
29- options ?: CookieAttributes ,
29+ options ?: Cookies . CookieAttributes ,
3030 ) : void {
3131 return ;
3232 }
You can’t perform that action at this time.
0 commit comments