@@ -0,0 +1,18 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
const API_BASE_URL = '/api';
|
||||
|
||||
export interface VersionResponse {
|
||||
version: string;
|
||||
}
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class VersionApiService {
|
||||
private readonly http = inject(HttpClient);
|
||||
|
||||
getVersion(): Observable<VersionResponse> {
|
||||
return this.http.get<VersionResponse>(`${API_BASE_URL}/version`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user