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

/**
 * 获取帐号权限视图
 * @param data
 * @returns
 */
export function getAccountPermitViewByList(data: any) {
  return apiRequest({
    url: '/account/permit/view',
    method: 'GET',
    params: data,
  })
}

/**
 * 添加帐号权限
 * @param accountId
 * @param permitId
 * @returns
 */
export function createAccountPermit(accountId: number, permitId: number) {
  return apiRequest({
    url: `/account/permit/add/${accountId}/${permitId}`,
    method: 'POST',
  })
}

/**
 * 删除帐号权限
 * @param accountId
 * @param permitId
 * @returns
 */
export function deleteAccountPermitById(accountId: number, permitId: number) {
  return apiRequest({
    url: `/account/permit/${accountId}/${permitId}`,
    method: 'DELETE',
  })
}
