Implement version info endpoint and update version display in UI

This commit is contained in:
adityachandelgit
2025-04-16 15:33:13 -06:00
committed by Aditya Chandel
parent 6d1384aac4
commit 70a4360207
9 changed files with 123 additions and 25 deletions
@@ -0,0 +1,22 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import {API_CONFIG} from '../../config/api-config';
export interface AppVersion {
current: string;
latest: string;
}
@Injectable({
providedIn: 'root'
})
export class VersionService {
private versionUrl = `${API_CONFIG.BASE_URL}/api/v1/version`;
constructor(private http: HttpClient) {}
getVersion(): Observable<AppVersion> {
return this.http.get<AppVersion>(this.versionUrl);
}
}