Files
public-pool-ui/src/app/services/worker.service.ts
T
2023-06-25 09:16:27 -04:00

24 lines
713 B
TypeScript

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 getGroupWorkerInfo(address: string, workerName: string): Observable<any> {
return this.httpClient.get(`${environment.API_URL}/api/client/${address}/${workerName}`);
}
public getWorkerInfo(address: string, workerName: string, workerId: string): Observable<any> {
return this.httpClient.get(`${environment.API_URL}/api/client/${address}/${workerName}/${workerId}`);
}
}