import api from "src/api";

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

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

  return data.payload;
};
