charting, routing and stats
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorkerService } from './worker.service';
|
||||
|
||||
describe('WorkerService', () => {
|
||||
let service: WorkerService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(WorkerService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class WorkerService {
|
||||
|
||||
constructor(
|
||||
private httpClient: HttpClient
|
||||
) { }
|
||||
|
||||
public getWorkerInfo(address: string, workerId: string): Observable<any> {
|
||||
return this.httpClient.get(`${environment.API_URL}/api/client/${address}/${workerId}`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user