import api from "src/api";

export const getCategories = async (type = null) => {
  const params = type ? { type } : {};
  const { data } = await api.get("/category", { params });
  return data.payload;
};
