refactor and cleanup
This commit is contained in:
14
services/database/addPoiService.js
Normal file
14
services/database/addPoiService.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// /services/database/addPoiService.js
|
||||
export const addPoiService = async (formData) => {
|
||||
const response = await fetch("/api/talas_v5_DB/pois/addLocation", {
|
||||
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();
|
||||
};
|
||||
Reference in New Issue
Block a user