member_webapp/@overflow/noauth-probe/service/noauth-probe.service.ts

36 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-04-06 11:02:18 +00:00
import { Injectable } from '@angular/core';
2018-06-04 08:25:29 +00:00
import { Observable } from 'rxjs';
2018-04-06 11:02:18 +00:00
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 { Domain } from '@overflow/commons-typescript/model/domain';
2018-04-06 11:02:18 +00:00
2018-05-02 08:09:39 +00:00
import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth';
2018-04-06 11:02:18 +00:00
@Injectable()
export class NoAuthProbeService {
public constructor(
private rpcService: RPCService,
) {
}
2018-05-24 11:03:23 +00:00
public readAllByDomainID(domainID: number): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.readAllByDomainID', domainID);
2018-04-06 11:02:18 +00:00
}
2018-06-14 04:38:51 +00:00
public acceptNoAuthProbe(id: number, zoneCIDR: string): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.acceptNoAuthProbe', id, zoneCIDR);
2018-04-06 11:02:18 +00:00
}
2018-06-14 04:38:51 +00:00
public denyNoauthProbe(id: number): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.denyNoauthProbe', id);
2018-04-06 11:02:18 +00:00
}
2018-06-14 06:45:39 +00:00
public read(id: number): Observable<NoAuthProbe> {
return this.rpcService.call<NoAuthProbe>('NoAuthProbeService.read', id);
}
2018-04-06 11:02:18 +00:00
}