import fetchWithTimeout from "./fetchWithTimeout"; export const fetchGisStatusStations = async (idMap, idUser) => { const SERVER_URL = process.env.NEXT_PUBLIC_SERVER_URL; 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; }); };