member_webapp/src/packages/target/service/target.service.ts

39 lines
784 B
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';
import { RPCService } from '@loafer/ng-rpc/service';
import { Target } from '../model';
import { Domain } from '../../domain/model';
@Injectable()
export class TargetService {
public constructor(
private rpcService: RPCService,
) {
}
public readAllByDomain(domain: Domain): Observable<Target[]> {
const body = {
domain: domain,
};
return this.rpcService.call('TargetService.readAllByDomain', domain);
}
// public readAllByProbe(domain: Domain): Observable<Target[]> {
// const body = {
// domain: domain,
// };
// return this.rpcService.call('TargetService.readAllByDomain', domain);
// }
}