import request from '@/utils/request'

// 查询题库列表
export function listRepo(query) {
  return request({
    url: '/elearn/repo/list',
    method: 'get',
    params: query
  })
}

// 查询题库详细
export function getRepo(repoId) {
  return request({
    url: '/elearn/repo/' + repoId,
    method: 'get'
  })
}

// 新增题库
export function addRepo(data) {
  return request({
    url: '/elearn/repo',
    method: 'post',
    data: data
  })
}





// 修改题库
export function updateRepo(data) {
  return request({
    url: '/elearn/repo',
    method: 'put',
    data: data
  })
}

// 删除题库
export function delRepo(repoId) {
  return request({
    url: '/elearn/repo/' + repoId,
    method: 'delete'
  })
}

// 导出题库
export function exportRepo(query) {
  return request({
    url: '/elearn/repo/export',
    method: 'get',
    params: query
  })
}
