refactor: Move API-Endpoint-Functions to /api/talas_v5_DB/ folder for better organization
This commit is contained in:
@@ -5,7 +5,6 @@ import { useRecoilValue, useRecoilState, useSetRecoilState } from "recoil";
|
||||
import { readPoiMarkersStore } from "../store/selectors/readPoiMarkersStore";
|
||||
import { poiReadFromDbTriggerAtom } from "../store/atoms/poiReadFromDbTriggerAtom";
|
||||
|
||||
|
||||
const ShowAddStationPopup = ({ onClose, map, latlng }) => {
|
||||
const [poiTypData, setpoiTypData] = useState(); // Recoil State verwenden
|
||||
const [name, setName] = useState("");
|
||||
@@ -21,7 +20,7 @@ const ShowAddStationPopup = ({ onClose, map, latlng }) => {
|
||||
useEffect(() => {
|
||||
const fetchpoiTypData = async () => {
|
||||
try {
|
||||
const response = await fetch("/api/readPoiTyp");
|
||||
const response = await fetch("/api/talas_v5_DB/poiTyp/readPoiTyp");
|
||||
const data = await response.json();
|
||||
setpoiTypData(data);
|
||||
if (data && data.length > 0) {
|
||||
@@ -96,7 +95,7 @@ const ShowAddStationPopup = ({ onClose, map, latlng }) => {
|
||||
.idLD,
|
||||
};
|
||||
|
||||
const response = await fetch("/api/addLocation", {
|
||||
const response = await fetch("/api/talas_v5_DB/pois/addLocation", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(formData),
|
||||
|
||||
Reference in New Issue
Block a user