17 lines
434 B
TypeScript
17 lines
434 B
TypeScript
import { cloudService } from './index'
|
|
import { IHealth, IHealthQuery } from '@/types/health'
|
|
|
|
export const updateHealthApi = (id: number, health: IHealth): Promise<boolean> =>
|
|
cloudService({
|
|
url: `/home-api/health/${id}`,
|
|
method: 'put',
|
|
data: health
|
|
})
|
|
|
|
export const queryHealthApi = (query: IHealthQuery): Promise<IHealth[]> =>
|
|
cloudService({
|
|
url: '/home-api/health',
|
|
method: 'get',
|
|
params: query
|
|
})
|