2020-11-02 01:26:21 +01:00
|
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
|
import { Injectable } from '@angular/core';
|
2021-02-06 17:07:25 +01:00
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
|
import { environment } from 'src/environments/environment';
|
2020-11-02 01:26:21 +01:00
|
|
|
|
|
|
|
|
@Injectable({
|
|
|
|
|
providedIn: 'root'
|
|
|
|
|
})
|
2021-02-06 17:07:25 +01:00
|
|
|
export class LogService {
|
2020-11-02 01:26:21 +01:00
|
|
|
|
2021-02-06 17:07:25 +01:00
|
|
|
constructor(private http: HttpClient) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list(): Observable<string[]> {
|
|
|
|
|
return this.http.get<string[]>(`${environment.apiBaseUrl}logs/`)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get(id: string): Observable<string[]> {
|
|
|
|
|
return this.http.get<string[]>(`${environment.apiBaseUrl}logs/${id}/`)
|
2020-11-02 01:26:21 +01:00
|
|
|
}
|
|
|
|
|
}
|