mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
23 lines
560 B
TypeScript
23 lines
560 B
TypeScript
import { HttpClient } from '@angular/common/http'
|
|
import { Injectable } from '@angular/core'
|
|
import { map, Observable } from 'rxjs'
|
|
import { environment } from 'src/environments/environment'
|
|
|
|
export interface AppRemoteVersion {
|
|
version: string
|
|
update_available: boolean
|
|
}
|
|
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
export class RemoteVersionService {
|
|
constructor(private http: HttpClient) {}
|
|
|
|
public checkForUpdates(): Observable<AppRemoteVersion> {
|
|
return this.http.get<AppRemoteVersion>(
|
|
`${environment.apiBaseUrl}remote_version/`
|
|
)
|
|
}
|
|
}
|