// /services/database/polylines/updatePolylineCoordinatesService.js

export const updatePolylineCoordinatesService = async (data) => {
  const response = await fetch("/api/talas_v5_DB/gisLines/updateLineCoordinates", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(data),
  });

  if (!response.ok) {
    const error = await response.json();
    throw new Error(error.error || "Fehler beim Aktualisieren der Polyline-Koordinaten");
  }

  return await response.json();
};
