Removed use of platform service and created different service for SSR and CSR

This commit is contained in:
Giuseppe Digilio
2018-05-03 19:08:07 +02:00
parent 3b9a334258
commit c8a1fe0860
14 changed files with 234 additions and 106 deletions

View File

@@ -71,7 +71,7 @@ export class AuthEffects {
public checkToken: Observable<Action> = this.actions$
.ofType(AuthActionTypes.CHECK_AUTHENTICATION_TOKEN)
.switchMap(() => {
return this.authService.checkAuthenticationToken()
return this.authService.hasValidAuthenticationToken()
.map((token: AuthTokenInfo) => new AuthenticatedAction(token))
.catch((error) => Observable.of(new CheckAuthenticationTokenErrorAction()));
});