import ajax from "@/utils/request";

export const getProductList = async (params) => {
  return ajax(`/product/getProductList`, "POST", params);
}

export const getProduct = async (id) =>
  ajax(`/product/getProduct`, "GET" , { id });

export const addProduct = async (params) =>
  ajax(`/product/addProduct`, "POST", params);

export const updateProduct = async (params) =>
  ajax(`/product/updateProduct`, "POST", params);

export const deleteProduct = async (id) =>
  ajax(`/product/deleteProduct`, "GET", { id });
