import request from '@/utils/request'

// 查询短链列表
export function listCourseLink(query) {
  return request({
    url: '/course/courseLink/list',
    method: 'get',
    params: query
  })
}

// 查询短链详细
export function getCourseLink(linkId) {
  return request({
    url: '/course/courseLink/' + linkId,
    method: 'get'
  })
}

// 新增短链
export function addCourseLink(data) {
  return request({
    url: '/course/courseLink',
    method: 'post',
    data: data
  })
}

// 修改短链
export function updateCourseLink(data) {
  return request({
    url: '/course/courseLink',
    method: 'put',
    data: data
  })
}

// 删除短链
export function delCourseLink(linkId) {
  return request({
    url: '/course/courseLink/' + linkId,
    method: 'delete'
  })
}

// 导出短链
export function exportCourseLink(query) {
  return request({
    url: '/course/courseLink/export',
    method: 'get',
    params: query
  })
}
