ing
This commit is contained in:
@@ -37,14 +37,18 @@ export class Effects {
|
||||
@Effect({ dispatch: false })
|
||||
signinSuccess$ = this.actions$
|
||||
.ofType(ActionType.SigninSuccess)
|
||||
.map((action: SigninSuccess) => action.payload)
|
||||
.do(
|
||||
() => {
|
||||
let queryString: string;
|
||||
if (this.cookieService.check('AuthToken')) {
|
||||
const authToken = this.cookieService.get('AuthToken');
|
||||
console.log(`AuthToken: ${authToken}`);
|
||||
queryString = `AuthToken=${authToken}`;
|
||||
}
|
||||
(result: Map<string, any>) => {
|
||||
const authToken = result['authToken'];
|
||||
// console.log(`authToken: ${authToken}`);
|
||||
|
||||
const expires = new Date();
|
||||
expires.setDate(expires.getDate() + 1);
|
||||
this.cookieService.set('authToken', authToken, expires, '/');
|
||||
|
||||
const queryString = `authToken=${authToken}`;
|
||||
|
||||
this.rpcClient.connect(queryString);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user