import request from '@/utils/request'

// 查询接口列表
export function listApi(query) {
  return request({
    url: '/test/api/list',
    method: 'get',
    params: query
  })
}

// 查询接口详细
export function getApi(id) {
  return request({
    url: '/test/api/' + id,
    method: 'get'
  })
}

// 新增接口
export function addApi(data) {
  return request({
    url: '/test/api',
    method: 'post',
    data: data
  })
}

// 修改接口
export function updateApi(data) {
  return request({
    url: '/test/api',
    method: 'put',
    data: data
  })
}

// 删除接口
export function delApi(id) {
  return request({
    url: '/test/api/' + id,
    method: 'delete'
  })
}
