import ajax from "@/utils/request";

export const getParentCateList = async () =>
  ajax(`/cate/getParentCateList`, "GET");

export const getCateList = async () =>
  ajax(`/cate/getCateList`, "GET");

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

export const addCategory = async (params) =>
  ajax(`/cate/addCategory`, "POST", params);

export const updateCategory = async (params) =>
  ajax(`/cate/updateCategory`, "POST", params);

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