import request from '@/utils/request'

// 查询直播投票列表
export function listVote(query) {
  return request({
    url: '/live/vote/list',
    method: 'get',
    params: query
  })
}

// 查询直播投票详细
export function getVote(id) {
  return request({
    url: '/live/vote/' + id,
    method: 'get'
  })
}

// 新增直播投票
export function addVote(data) {
  return request({
    url: '/live/vote',
    method: 'post',
    data: data
  })
}

// 修改直播投票
export function updateVote(data) {
  return request({
    url: '/live/vote',
    method: 'put',
    data: data
  })
}

// 删除直播投票
export function delVote(ids) {
  return request({
    url: '/live/vote/' + ids,
    method: 'delete'
  })
}

// 开始投票
export function startVote(id) {
  return request({
    url: '/live/vote/start/' + id,
    method: 'put'
  })
}

// 结束投票
export function endVote(id) {
  return request({
    url: '/live/vote/end/' + id,
    method: 'put'
  })
}
