ing
This commit is contained in:
parent
d773379d8f
commit
69e32ba623
|
@ -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));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user