member_webapp/@overflow/noauth/service/noauth-probe.service.ts
crusader d59d9379f9 ing
2018-05-24 15:44:13 +09:00

34 lines
975 B
TypeScript

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import { RPCService } from '@loafer/ng-rpc';
import { Domain } from '@overflow/commons-typescript/model/domain';
import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth';
@Injectable()
export class NoAuthProbeService {
public constructor(
private rpcService: RPCService,
) {
}
public readAllByDomain(domain: Domain): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.readAllByDomain', domain);
}
public acceptNoAuthProbe(noAuthProbe: NoAuthProbe): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.acceptNoAuthProbe', noAuthProbe);
}
public denyNoauthProbe(noAuthProbe: NoAuthProbe): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.denyNoauthProbe', noAuthProbe);
}
}