import api from "src/api";

export const getSupportTickets = async () => {
  const { data } = await api.get("/support-ticket");
  return data.payload;
};

export const createSupportTicket = async (payload) => {
  const { data } = await api.post("/support-ticket", payload);
  return data.payload;
};

export const updateSupportTicket = async (id, payload) => {
  const { data } = await api.put(`/support-ticket/${id}`, payload);
  return data.payload;
};

export const deleteSupportTicket = async (id) => {
  const { data } = await api.delete(`/support-ticket/${id}`);
  return data;
};
