import request from '@/utils/request'

// 查询OTA任务列表
export function listTasks(query) {
  return request({
    url: '/OTA/tasks/list',
    method: 'get',
    params: query
  })
}

// 查询OTA任务详细
export function getTasks(id) {
  return request({
    url: '/OTA/tasks/' + id,
    method: 'get'
  })
}

// 新增OTA任务
export function addTasks(data) {
  return request({
    url: '/OTA/tasks',
    method: 'post',
    data: data
  })
}

// 修改OTA任务
export function updateTasks(data) {
  return request({
    url: '/OTA/tasks',
    method: 'put',
    data: data
  })
}

// 删除OTA任务
export function delTasks(id) {
  return request({
    url: '/OTA/tasks/' + id,
    method: 'delete'
  })
}
