11aba5dbd0
Signed-off-by: Gato <cedric@goutailler-olivier.fr>
19 lines
464 B
TypeScript
19 lines
464 B
TypeScript
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`);
|
|
}
|
|
}
|