refactor(area): Bereichsaktualisierung von util auf Redux umgestellt

- updateAreaUtil.js entfernt
- updateAreaService, updateAreaThunk, updateAreaSlice eingeführt
- useAreaMarkersLayer nutzt jetzt updateAreaThunk
- MapComponent umgestellt auf Redux-Dispatch
- Version erhöht auf 1.1.182
This commit is contained in:
ISA
2025-05-27 07:55:12 +02:00
parent b6acf719ff
commit 44cb27ce0f
12 changed files with 159 additions and 94 deletions

View File

@@ -1,27 +0,0 @@
export const updateLocation = async (idLocation, idMap, newCoords) => {
try {
const response = await fetch("/api/talas_v5_DB/bereich/updateBereich", {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
idLocation,
idMap,
x: newCoords.x,
y: newCoords.y,
}),
});
if (!response.ok) {
throw new Error("Fehler beim Aktualisieren der Koordinaten");
}
const data = await response.json();
console.log("Koordinaten erfolgreich aktualisiert:", data);
return data;
} catch (error) {
console.error("Fehler beim Aufruf von updateLocation:", error);
throw error;
}
};