Files
paperless-ngx/src-ui/src/app/services/rest/log.service.ts
2022-03-11 11:58:19 -08:00

20 lines
526 B
TypeScript

import { HttpClient } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { Observable } from 'rxjs'
import { environment } from 'src/environments/environment'
@Injectable({
providedIn: 'root',
})
export class LogService {
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}/`)
}
}