import request from '@/utils/request'

// 查询敏感词列表
export function listWords(query) {
  return request({
    url: '/management/words/list',
    method: 'get',
    params: query
  })
}

// 查询敏感词详细
export function getWords(sensitiveWordsId) {
  return request({
    url: '/management/words/' + sensitiveWordsId,
    method: 'get'
  })
}

// 新增敏感词
export function addWords(data) {
  return request({
    url: '/management/words',
    method: 'post',
    data: data
  })
}

// 修改敏感词
export function updateWords(data) {
  return request({
    url: '/management/words',
    method: 'put',
    data: data
  })
}

// 删除敏感词
export function delWords(sensitiveWordsId) {
  return request({
    url: '/management/words/' + sensitiveWordsId,
    method: 'delete'
  })
}

// 导出敏感词
export function exportWords(query) {
  return request({
    url: '/management/words/export',
    method: 'get',
    params: query
  })
}