member_webapp/@overflow/notification/service/notification.service.ts

34 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-04-06 11:02:18 +00:00
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
2018-05-24 06:44:13 +00:00
import { RPCService } from '@loafer/ng-rpc';
2018-04-06 11:02:18 +00:00
2018-05-02 08:09:39 +00:00
import { Notification } from '@overflow/commons-typescript/model/notification';
import { Member } from '@overflow/commons-typescript/model/member';
2018-05-24 06:44:13 +00:00
// import { PageParams, Page } from 'app/commons/model';
2018-04-06 11:02:18 +00:00
@Injectable()
export class NotificationService {
public constructor(
private rpcService: RPCService,
) {
}
2018-05-24 06:44:13 +00:00
// public readAllByMember(member: Member, pageParams: PageParams): Observable<Page> {
// return this.rpcService.call('NotificationService.readAllByMember', member, pageParams);
// }
2018-04-06 11:02:18 +00:00
2018-05-24 06:44:13 +00:00
// public markAllAsRead(member: Member, pageParams: PageParams): Observable<Page> {
// return this.rpcService.call('NotificationService.markAllAsRead', member, pageParams);
// }
2018-04-06 11:02:18 +00:00
public markAsRead(notification: Notification): Observable<Notification> {
return this.rpcService.call('NotificationService.markAsRead', notification);
}
}