import request from '@/utils/request'

// 查询本人密钥对
export function appListAccess(params) {
  return request({
    url: '/app/access/list',
    method: 'get',
    params
  })
}

// 申请密钥对
export function appAddAccess() {
  return request({
    url: '/app/access',
    method: 'post'
  })
}

// 重置密钥对
export function appResetAccess(accessId) {
  return request({
    url: `/app/access/${accessId}/reset`,
    method: 'put'
  })
}

// 删除密钥对
export function mchDelAccess(accessId) {
  return request({
    url: `/app/access/${accessId}`,
    method: 'delete'
  })
}
