refactor: GIS-Redux-Slices reduziert auf 4 (statt 5) – veraltete Slices und Thunks entfernt, Code bereinigt
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
// /services/webservice/fetchGisStatusStationsService.js
|
||||
import fetchWithTimeout from "../utils/fetchWithTimeout";
|
||||
|
||||
export const fetchGisStatusStationsService = async (idMap, idUser) => {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const SERVER_URL = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80` : `${window.location.origin}`;
|
||||
|
||||
return fetchWithTimeout(
|
||||
`${SERVER_URL}/talas5/ClientData/WebServiceMap.asmx/GisStationsStatusDistrict?idMap=${idMap}&idUser=${idUser}`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
Connection: "close",
|
||||
},
|
||||
},
|
||||
5000
|
||||
)
|
||||
.then((response) => {
|
||||
if (!response.ok) throw new Error(`Error: ${response.statusText}`);
|
||||
return response.json();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Fehler beim Abrufen der Daten in fetchGisStatusStations:", error);
|
||||
throw error;
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user