Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- logIn(username: string, password: string): any {
- return this.http.post<User>(this.API.LOGIN, { username, password });
- }
- LogIn: Observable<any> = this.actions
- .ofType<any>(AuthActionTypes.LOGIN)
- .map((action: LogIn) => action.payload)
- .exhaustMap(payload => {
- return this.authService.logIn(payload.username, payload.password).pipe(
- map(user => {
- return new LogInSuccess({
- username: user,
- });
- }),
- catchError(error => console.log(error)),
- );
- });
Add Comment
Please, Sign In to add comment