ing
This commit is contained in:
5
@overflow/noauth-probe/service/index.ts
Normal file
5
@overflow/noauth-probe/service/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { NoAuthProbeService } from './noauth-probe.service';
|
||||
|
||||
export const SERVICES = [
|
||||
NoAuthProbeService,
|
||||
];
|
||||
15
@overflow/noauth-probe/service/noauth-probe.service.spec.ts
Normal file
15
@overflow/noauth-probe/service/noauth-probe.service.spec.ts
Normal 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();
|
||||
}));
|
||||
});
|
||||
33
@overflow/noauth-probe/service/noauth-probe.service.ts
Normal file
33
@overflow/noauth-probe/service/noauth-probe.service.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user