This commit is contained in:
crusader
2018-05-24 16:26:43 +09:00
parent 9370c2c964
commit c613e312f0
27 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
import { NoAuthProbeService } from './noauth-probe.service';
export const SERVICES = [
NoAuthProbeService,
];

View File

@@ -0,0 +1,15 @@
import { TestBed, inject } from '@angular/core/testing';
import { NoAuthProbeService } from './noauth-probe.service';
describe('NoAuthProbeService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [NoAuthProbeService]
});
});
it('should be created', inject([NoAuthProbeService], (service: NoAuthProbeService) => {
expect(service).toBeTruthy();
}));
});

View File

@@ -0,0 +1,33 @@
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);
}
}