20 lines
606 B
TypeScript
20 lines
606 B
TypeScript
import { requestJson } from "./http";
|
|
|
|
export type HealthResponse = {
|
|
status: string;
|
|
version: string;
|
|
};
|
|
|
|
export type BackendMetaResponse = {
|
|
version: string;
|
|
};
|
|
|
|
export async function getHealth(init?: RequestInit): Promise<HealthResponse> {
|
|
return requestJson<HealthResponse>("/health", init);
|
|
}
|
|
|
|
/** Версия бэкенда для футера (отдельный путь от /health — меньше ложных блокировок). */
|
|
export async function getBackendMeta(init?: RequestInit): Promise<BackendMetaResponse> {
|
|
return requestJson<BackendMetaResponse>("/meta", init);
|
|
}
|