cleanup: veraltete GIS-Fetch-Dateien entfernt – Projekt verwendet nur noch zentrale Thunks und Services
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsMeasurements.js
|
||||
|
||||
export const fetchGisStationsMeasurements = async () => {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
|
||||
const url = `${apiBaseUrl}/GisStationsMeasurements?idMap=${idMap}&idUser=${idUser}`;
|
||||
console.log("🔍 fetchGisStationsMeasurements - URL:", url);
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("GisStationsMeasurements konnte nicht geladen werden");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
};
|
||||
@@ -1,29 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsStatic.js
|
||||
|
||||
export const fetchGisStationsStatic = async () => {
|
||||
try {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
|
||||
const url = `${apiBaseUrl}/GisStationsStatic?idMap=${idMap}`;
|
||||
console.log("🔍 fetchGisStationsStatic - URL:", url);
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
const text = await response.text();
|
||||
console.log("📡 API Response Text von fetch:", text);
|
||||
|
||||
if (!response.ok || !response.headers.get("content-type")?.includes("application/json")) {
|
||||
throw new Error("❌ Fehler: Antwort ist kein gültiges JSON");
|
||||
}
|
||||
|
||||
return JSON.parse(text);
|
||||
} catch (error) {
|
||||
console.error("❌ Fehler beim Abrufen der GIS Stations Static:", error);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsStaticDistrict.js
|
||||
|
||||
export const fetchGisStationsStaticDistrict = async () => {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
|
||||
const url = `${apiBaseUrl}/GisStationsStaticDistrict?idMap=${idMap}&idUser=${idUser}`;
|
||||
console.log("🔍 fetchGisStationsStaticDistrict - URL:", url);
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("GisStationsStaticDistrict konnte nicht geladen werden");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsStatusDistrict.js
|
||||
|
||||
export const fetchGisStationsStatusDistrict = async () => {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
|
||||
const url = `${apiBaseUrl}/GisStationsStatusDistrict?idMap=${idMap}&idUser=${idUser}`;
|
||||
console.log("🔍 fetchGisStationsStatusDistrict - URL:", url);
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("GisStationsStatusDistrict konnte nicht geladen werden");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisSystemStatic.js
|
||||
|
||||
export async function fetchGisSystemStatic() {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
console.log("🔍 fetchGisSystemStatic - idMap:", idMap);
|
||||
console.log("🔍 fetchGisSystemStatic - idUser:", idUser);
|
||||
console.log("🔍 fetchGisSystemStatic - URL:", `${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
|
||||
const response = await fetch(`${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
const data = await response.json();
|
||||
|
||||
//console.log("✅ fetchGisSystemStatic - Daten:", data);
|
||||
return data;
|
||||
}
|
||||
Reference in New Issue
Block a user