first commit of refactor
This commit is contained in:
18
frontend/src/api/status.jsx
Normal file
18
frontend/src/api/status.jsx
Normal file
@@ -0,0 +1,18 @@
|
||||
// API client for system status
|
||||
|
||||
const API_BASE = '/api';
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
Reference in New Issue
Block a user