import { request } from '@/service/request';

// 查询OSS云存储列表
export function listOss(query?: Api.SystemManage.OssSearchParams) {
  return request<Api.SystemManage.OssList>({
    url: '/system/oss/list',
    method: 'get',
    params: query
  });
}

// 删除OSS云存储
export function delOss(ossIds: Api.SystemManage.Oss['ossId'][]) {
  return request({
    url: `/system/oss/${ossIds}`,
    method: 'delete'
  });
}

export function changePreviewListResource(previewListResource: boolean) {
  return request({
    url: '/system/oss/changePreviewListResource',
    method: 'put',
    data: {
      previewListResource
    }
  });
}
