- 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
15 lines
389 B
JavaScript
15 lines
389 B
JavaScript
// /services/database/addPoiService.js
|
|
export const addPoiService = async (formData) => {
|
|
const response = await fetch("/api/talas_v5_DB/pois/addPoi", {
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json" },
|
|
body: JSON.stringify(formData),
|
|
});
|
|
|
|
if (!response.ok) {
|
|
throw new Error("Fehler beim Hinzufügen des POI");
|
|
}
|
|
|
|
return await response.json();
|
|
};
|