Files

20 lines
456 B
TypeScript
Raw Permalink Normal View History

2026-04-25 16:36:34 +08:00
import { request } from '../api/request';
import { buildCachedRequest } from '../cache/utils';
/**
*
*/
export const fetchAvailableServices = buildCachedRequest(
'fetchAvailableServices',
async (): Promise<string[]> => {
const { data } = await request.get<{
nodeID: string;
cpu: unknown;
memory: unknown;
services: string[];
}>('/api/gateway/health');
return data.services;
}
);