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 { 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,
|
|
|
|
) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|