paperless-ngx/src-ui/src/app/services/rest/log.service.ts

22 lines
533 B
TypeScript
Raw Normal View History

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';
@Injectable({
providedIn: 'root'
})
2021-02-06 17:07:25 +01:00
export class LogService {
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}/`)
}
}