import apiRequest from '@/network/http/apiRequest'

/**
 * 获取Api Request分页
 * @param data
 * @returns
 */
export function getApiReqByPage(data: any) {
  return apiRequest({
    url: '/api/log/page',
    method: 'GET',
    params: data,
  })
}

/**
 * 获取Api Request列表
 * @param data
 * @returns
 */
export function getApiReqByList(data: any) {
  return apiRequest({
    url: '/api/log',
    method: 'GET',
    params: data,
  })
}

/**
 * 根据Id获取Api Request
 * @param reqId
 * @returns
 */
export function getApiReqById(reqId: number) {
  return apiRequest({
    url: `/api/log/${reqId}`,
    method: 'GET',
  })
}

/**
 * 删除Api
 * @param reqId
 * @returns
 */
export function deleteApiReqById(reqId: number) {
  return apiRequest({
    url: `/paas/api/request/${reqId}`,
    method: 'DELETE',
  })
}
