beetask/frontend/src/services/statusService.ts
2026-05-12 20:06:44 -04:00

20 lines
399 B
TypeScript

import { apiFetch } from "../lib/api";
type HealthData = Record<string, string | number | boolean | null>;
type HealthCheck = {
name: string;
status: string;
data?: HealthData;
};
export type BackendHealthResponse = {
status: string;
checks?: HealthCheck[];
};
export async function getBackendStatus() {
return apiFetch<BackendHealthResponse>("/status", {
method: "GET",
});
}