beetask/frontend/src/services/statusService.ts
2026-05-15 15:39:32 -04:00

21 lines
421 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>("/q/status", {
method: "GET",
skipAuth: true,
});
}