mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	RemoteVersionService
This commit is contained in:
		
							
								
								
									
										22
									
								
								src-ui/src/app/services/rest/remote-version.service.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								src-ui/src/app/services/rest/remote-version.service.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
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
 | 
			
		||||
  greater_than_current: boolean
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@Injectable({
 | 
			
		||||
  providedIn: 'root',
 | 
			
		||||
})
 | 
			
		||||
export class RemoteVersionService {
 | 
			
		||||
  constructor(private http: HttpClient) {}
 | 
			
		||||
 | 
			
		||||
  public checkForUpdates(): Observable<AppRemoteVersion> {
 | 
			
		||||
    return this.http.get<AppRemoteVersion>(
 | 
			
		||||
      `${environment.apiBaseUrl}remote_version/`
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user