import api from "src/api";

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

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

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

export const deleteTreasuryAccount = async (id) => {
  const { data } = await api.delete(`/treasury-account/${id}`);
  return data;
};
