// /services/database/updatePoiService.js

export const updatePoiService = async (poi) => {
  const response = await fetch("/api/talas_v5_DB/pois/updatePoi", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify(poi),
  });

  if (!response.ok) {
    const error = await response.json();
    throw new Error(error.error || "Fehler beim Aktualisieren des POI.");
  }
};
