17 lines
623 B
JavaScript
17 lines
623 B
JavaScript
// ==============================|| HEALTH SERVICE ||============================== //
|
|
// Backend liveness/readiness. Note: these endpoints live at the API root (/health, /ready),
|
|
// not under /admin — the path passed here is still relative to VITE_API_BASE_URL.
|
|
|
|
import { get } from './http';
|
|
import { mockHealth, mockReady } from './mock/health';
|
|
|
|
/** @returns {Promise<import('./dto').HealthResponse>} */
|
|
export function getHealth() {
|
|
return get('/health', { mock: mockHealth });
|
|
}
|
|
|
|
/** @returns {Promise<import('./dto').ReadyResponse>} */
|
|
export function getReady() {
|
|
return get('/ready', { mock: mockReady });
|
|
}
|