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

32 lines
937 B
TypeScript
Raw Normal View History

2018-04-06 20:02:18 +09:00
import { Injectable } from '@angular/core';
2018-06-04 17:25:29 +09:00
import { Observable } from 'rxjs';
2018-04-06 20:02:18 +09:00
2018-05-24 15:44:13 +09:00
import { RPCService } from '@loafer/ng-rpc';
2018-04-06 20:02:18 +09:00
2018-05-02 17:09:39 +09:00
import { Domain } from '@overflow/commons-typescript/model/domain';
2018-04-06 20:02:18 +09:00
2018-05-02 17:09:39 +09:00
import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth';
2018-04-06 20:02:18 +09:00
@Injectable()
export class NoAuthProbeService {
public constructor(
private rpcService: RPCService,
) {
}
2018-05-24 20:03:23 +09:00
public readAllByDomainID(domainID: number): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.readAllByDomainID', domainID);
2018-04-06 20:02:18 +09:00
}
2018-05-24 20:03:23 +09:00
public acceptNoAuthProbe(noAuthProbeID: number): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.acceptNoAuthProbe', noAuthProbeID);
2018-04-06 20:02:18 +09:00
}
2018-05-24 20:03:23 +09:00
public denyNoauthProbe(noAuthProbeID: number): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.denyNoauthProbe', noAuthProbeID);
2018-04-06 20:02:18 +09:00
}
}