import http from "../http-common";
const getAll = (date) => {
  const params = {};
  if (date) {
    params.date = date;
  }
  return http.get("/seatings", {params});
};

const createNewSeating = (data) => {
  data.status = 'active';
	return http.post('/seatings', data);
};

const updateSeating = (id, data) => {
  return http.put(`/seatings/${id}`, data);
}

const deleteSeating = (id) => {
  return http.delete(`/seatings/${id}`)
}

export const SeatingService = {
	getAll,
	createNewSeating,
	updateSeating,
	deleteSeating
}