import api from "src/api";

export const getTreasuryLaunches = async (params = {}) => {
  const { data } = await api.get("/treasury-launch", { params });
  return data.payload;
};

export const createTreasuryLaunch = async (payload) => {
  const { data } = await api.post("/treasury-launch", payload);
  return data.payload;
};

export const updateTreasuryLaunch = async (id, payload) => {
  const { data } = await api.put(`/treasury-launch/${id}`, payload);
  return data.payload;
};

export const deleteTreasuryLaunch = async (id) => {
  await api.delete(`/treasury-launch/${id}`);
};
