This commit is contained in:
crusader 2018-05-25 12:39:43 +09:00
parent d773379d8f
commit 69e32ba623

View File

@ -50,15 +50,15 @@ export class Effects {
return of(new ReadAllByMemberFailure(error)); return of(new ReadAllByMemberFailure(error));
}); });
@Effect() @Effect()
markAllAsRead$: Observable<Action> = this.actions$ markAllAsRead$: Observable<Action> = this.actions$
.ofType(ActionType.MarkAllAsRead) .ofType(ActionType.MarkAllAsRead)
.map((action: MarkAllAsRead) => action.payload) .map((action: MarkAllAsRead) => action.payload)
.switchMap(payload => this.notificationService.markAllAsRead(payload.member, payload.pageParams)) .switchMap(payload => this.notificationService.markAllAsRead(payload.member, payload.pageParams))
.map(page => { .map(page => {
return new MarkAllAsReadSuccess(page); return new MarkAllAsReadSuccess(page);
}) })
.catch((error: RPCClientError) => { .catch((error: RPCClientError) => {
return of(new MarkAllAsReadFailure(error)); return of(new MarkAllAsReadFailure(error));
}); });
} }