update api
This commit is contained in:
16
src/services/healthService.js
Normal file
16
src/services/healthService.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// ==============================|| 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 });
|
||||
}
|
||||
Reference in New Issue
Block a user