import request from '@/utils/request'

const api = {
  bugList: 'test/defect/list',
  addBug: 'test/defect/addBug',
  delBug: 'test/defect/delBug',
  getBugDetail: 'test/defect/bugDetail',
  updateBug: 'test/defect/editBug'
}

export function getBugList(data) {
  return request({
    url: api.bugList,
    method: 'get',
    params: data
  })
}

export function addBug(data) {
  return request({
    url: api.addBug,
    method: 'post',
    data
  })
}

export function delBug(id) {
  return request({
    url: api.delBug,
    method: 'post',
    data: {id}
  })
}


export function getBugDetail(id) {
  return request({
    url: api.getBugDetail,
    method: 'post',
    data: {id}
  })
}

export function updateBug(data) {
  return request({
    url: api.updateBug,
    method: 'post',
    data:data
  })
}

