// 数据源接口

import serviceAxios from "@/http/index";

// 根据展厅id查询数据源列表
export const getGalleryDataSources = (params) => {
  return serviceAxios({
    url: `/vrone/backend/dataSources/getListByAppId/${params}`,
    method: "get",
  });
};

// 新增数据源
export const addDataSource = (data) => {
  return serviceAxios({
    url: "/vrone/backend/dataSources",
    method: "post",
    data,
  });
};

// 修改数据源
export const updateDataSource = (data) => {
  return serviceAxios({
    url: "/vrone/backend/dataSources",
    method: "put",
    data: data,
  });
};

// 卸载数据源
export const uninstallDataSource = (data) => {
  return serviceAxios({
    url: "/vrone/backend/spots/unloadSpot",
    method: "patch",
    data: data,
  });
};

// 挂载数据源
export const mountDataSource = (data) => {
  return serviceAxios({
    url: "/vrone/backend/spots/mountSpot",
    method: "patch",
    data: data,
  });
};
