logout notification is modified

This commit is contained in:
병준 박 2019-11-19 19:03:58 +09:00
parent 81c3cbe43a
commit 92129ef2d7
2 changed files with 4 additions and 6 deletions

View File

@ -127,7 +127,7 @@ export class AppNotificationService {
default:
break;
}
this.store.dispatch(AuthenticationStore.logout());
this.store.dispatch(AuthenticationStore.loginRedirect());
})
)
.subscribe();

View File

@ -125,10 +125,9 @@ export class Effects {
ofType(loginRedirect),
tap(authed => {
this.ngZone.run(() => {
this.router.navigate(['/account/login']).then(() => {
this.store.dispatch(logoutInitialize());
location.reload();
});
this.appAuthenticationService.logout();
this.store.dispatch(logoutInitialize());
location.href = this.router.parseUrl('/account/login').toString();
});
})
),
@ -142,7 +141,6 @@ export class Effects {
switchMap(action => {
return this.authenticationProtocolService.logout({}).pipe(
map(res => {
this.appAuthenticationService.logout();
this.store.dispatch(loginRedirect());
}),
catchError(error => of(error))