small fixes for authentication

This commit is contained in:
lotte
2018-09-12 16:11:04 +02:00
parent caf9194f36
commit 1f336f29fd
25 changed files with 115 additions and 87 deletions

View File

@@ -28,7 +28,7 @@ import {
RegistrationErrorAction,
RegistrationSuccessAction
} from './auth.actions';
import { Eperson } from '../eperson/models/eperson.model';
import { EPerson } from '../eperson/models/eperson.model';
import { AuthStatus } from './models/auth-status.model';
import { AuthTokenInfo } from './models/auth-token-info.model';
import { AppState } from '../../app.reducer';
@@ -63,7 +63,7 @@ export class AuthEffects {
.ofType(AuthActionTypes.AUTHENTICATED)
.switchMap((action: AuthenticatedAction) => {
return this.authService.authenticatedUser(action.payload)
.map((user: Eperson) => new AuthenticatedSuccessAction((user !== null), action.payload, user))
.map((user: EPerson) => new AuthenticatedSuccessAction((user !== null), action.payload, user))
.catch((error) => Observable.of(new AuthenticatedErrorAction(error)));
});
@@ -88,7 +88,7 @@ export class AuthEffects {
.debounceTime(500) // to remove when functionality is implemented
.switchMap((action: RegistrationAction) => {
return this.authService.create(action.payload)
.map((user: Eperson) => new RegistrationSuccessAction(user))
.map((user: EPerson) => new RegistrationSuccessAction(user))
.catch((error) => Observable.of(new RegistrationErrorAction(error)));
});