import ajax from '../utils/request.js';

/**
 * 审核图片
 * @param {object} ori
 * @returns
 */
export function storeImg(ori) {
  return ajax({
    api: '/review/img/store',
    data: ori.data,
    base: 'videoProcessing',
    method: 'POST',
    headers: {
      Authorization: localStorage.getItem('token')
    }
  });
}

/**
 * 图片历史记录
 * @param {object} ori
 * @returns
 */
export function historyImg(ori) {
  return ajax({
    api: '/review/img/list',
    data: ori.data,
    base: 'videoProcessing',
    method: 'POST',
    headers: {
      Authorization: localStorage.getItem('token')
    }
  });
}

/**
 * 图片删除
 * @param {object} ori 
 * @returns 
 */
export function deleteRowImage(ori) {
    return ajax({
      api: '/review/img/del?id=' + ori.id,
      base: 'videoProcessing',
      method: 'GET',
      headers: {
        Authorization: localStorage.getItem('token')
      }
    });
}

/**
 * 审核视频
 * @param {object} ori
 * @returns
 */
export function storeVideo(ori) {
  return ajax({
    api: '/review/video/store',
    data: ori.data,
    base: 'videoProcessing',
    method: 'POST',
    headers: {
      Authorization: localStorage.getItem('token')
    }
  });
}

/**
 * 视频历史记录
 * @param {object} ori
 * @returns
 */
export function historyVideo(ori) {
  return ajax({
    api: '/review/video/list',
    data: ori.data,
    base: 'videoProcessing',
    method: 'POST',
    headers: {
      Authorization: localStorage.getItem('token')
    }
  });
}


/**
 * 视频删除
 * @param {object} ori 
 * @returns 
 */
export function deleteRowVideo(ori) {
    return ajax({
      api: '/review/video/del?id=' + ori.id,
      base: 'videoProcessing',
      method: 'GET',
      headers: {
        Authorization: localStorage.getItem('token')
      }
    });
}
