talas5 Verzeichnis gelöscht, weil ich bekomme alles von WebServices und in der Produktionsumgebung läuft Entwicklungsumgebung
This commit is contained in:
23
services/fetchGisStatusStations.js
Normal file
23
services/fetchGisStatusStations.js
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user