fix(poi): Fehler beim Hinzufügen von POIs behoben (Modal blieb offen)

- Falsche URL im addPoiService korrigiert (/addLocation → /addPoi)
- Redux-Status wird nach erfolgreichem Hinzufügen zurückgesetzt (resetAddPoiStatus)
- Modal schließt jetzt zuverlässig nach dem Dispatch
- Ladeanzeige "Wird hinzugefügt..." verschwindet korrekt
- Version auf 1.1.176 erhöht
This commit is contained in:
ISA
2025-05-26 13:52:17 +02:00
parent ff55481273
commit cd46401f14
12 changed files with 162 additions and 81 deletions

View File

@@ -1,6 +1,6 @@
// /services/database/addPoiService.js
export const addPoiService = async (formData) => {
const response = await fetch("/api/talas_v5_DB/pois/addLocation", {
const response = await fetch("/api/talas_v5_DB/pois/addPoi", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(formData),

View File

@@ -0,0 +1,6 @@
// /services/database/pois/fetchPoiMarkersService.js
export const fetchPoiMarkersService = async () => {
const response = await fetch("/api/talas_v5_DB/pois/readAllPOIs");
if (!response.ok) throw new Error("Fehler beim Laden der POIs");
return await response.json();
};