Files
nodeMap/services/api/updateLocationInDatabase.js

14 lines
454 B
JavaScript

// /services/api/updateLocationInDatabase.js
export const updateLocationInDatabase = async (id, newLatitude, newLongitude) => {
const response = await fetch("/api/talas_v5_DB/pois/updateLocation", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ id, latitude: newLatitude, longitude: newLongitude }),
});
if (!response.ok) {
console.error("Fehler beim Aktualisieren der Position");
}
};