You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
969 B
13 lines
969 B
import http from 'libs/http'
|
|
|
|
const baseUrl = '/tasks/'
|
|
export const setTargetTemperature = (params: Home.SetTargetTemperatureParams): Promise<null> => http.post('/heat/target-temperature', params)
|
|
export const trayTube = (params: Home.TrayTubeParams): Promise<null> => http.post('/tray/tube', params)
|
|
export const addTask = (params: Task.TaskAdd): Promise<null> => http.post(baseUrl, params)
|
|
export const stopTask = (): Promise<null> => http.post(`${baseUrl}stop`)
|
|
export const getTask = (id: number): Promise<Task.Task> => http.get(`${baseUrl}${id}`)
|
|
export const taskList = (params: Task.TaskQuery): Promise<Task.Task[]> => http.get(`${baseUrl}list`, { params })
|
|
export const getTaskIng = (): Promise<null> => http.get(`${baseUrl}getIngTask`)
|
|
export const delTask = (params: string): Promise<null> => http.delete(`${baseUrl}${params}`)
|
|
export const trayIn = (): Promise<null> => http.post('tray/in')
|
|
export const trayOut = (): Promise<null> => http.post('tray/out')
|