Files
koin_ping_0.2.0/frontend/src/api/status.jsx
KS Jannette da8b45012a fmt: apply prettier to frontend JS/TS/CSS/JSON files
Initial prettier pass with tabWidth=4.
2026-02-28 20:07:28 -05:00

19 lines
468 B
JavaScript

// API client for system status
import { API_BASE } from "./config";
/**
* Get system status including latest processed block and health
* @returns {Promise<Object>} System status
*/
export async function getSystemStatus() {
const response = await fetch(`${API_BASE}/status`);
if (!response.ok) {
const error = await response.json();
throw new Error(error.message || "Failed to fetch system status");
}
return response.json();
}