import api from "src/api";

export const getMediasByUnit = async () => {
  const { data } = await api.get("/franchisee/unit/medias");
  return data.payload;
};

export const createMedia = async (formData) => {
  const { data } = await api.post("/franchisee/unit/medias", formData, {
    headers: { "Content-Type": "multipart/form-data" },
  });

  return data.payload;
};
