import { loadEnv } from "@build/index";
import { http } from "/@/utils/http";

const { VITE_PROXY_DOMAIN_REAL } = loadEnv();

export async function httpList(data: object = {}): Promise<DataType<any>> {
  return http.request(
    `post`,
    `${VITE_PROXY_DOMAIN_REAL}admin/getDataGroupList`,
    {
      data
    }
  );
}
export async function httpDelete(data: object = {}): Promise<DataType<any>> {
  return http.request(
    `post`,
    `${VITE_PROXY_DOMAIN_REAL}admin/deleteDataGroup`,
    {
      data
    }
  );
}
export async function httpUpdate(data: object = {}): Promise<DataType<any>> {
  return http.request(`post`, `${VITE_PROXY_DOMAIN_REAL}admin/editDataGroup`, {
    data
  });
}
export async function httpStatus(data: object = {}): Promise<DataType<any>> {
  return http.request(
    `post`,
    `${VITE_PROXY_DOMAIN_REAL}admin/statusDataGroup`,
    {
      data
    }
  );
}
