12 lines
408 B
JavaScript
12 lines
408 B
JavaScript
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");
|
|
}
|
|
};
|