// import axios from '~/http/request';
import request from '@/utils/request';

// 获取存储源文件列表
export function loadFileListReq(data) {
  return request({
    url: `/api/storage/files`,
    method: 'post',
    data:data,
    config: {
      showDefaultMsg: false
    }
  });
};

// 获取存储源文件详情
export function loadFileItemReq(data) {
  return request({
    url: `/api/storage/file/item`,
    method: 'post',
    data:data,
    config: {
      responseIntercept: false,
      showDefaultMsg: false
    }
  });
};

// 获取全局站点设置
export const loadGlobalSiteConfigReq = () => {
  return request({
    url: `/api/site/config/global`,
    method: 'get'
  });
};

// 获取存储源设置
export function loadStorageConfigReq(data) {
  return request({
    url: `/api/site/config/storage`,
    method: 'post',
    data:data
  });
};

// 批量生成直/短链
export function batchGenerateShortLinkReq(data) {
  return request({
    url: `/api/short-link/batch/generate`,
    method: 'post',
    data:data
  });
};
