fix:gis_Lines error 404 holt leere Array

This commit is contained in:
ISA
2025-03-17 12:11:29 +01:00
parent a1e33f650e
commit 154d310117
8 changed files with 10 additions and 9 deletions

View File

@@ -4,7 +4,10 @@ const apiBaseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;
export const fetchGisStationsStatic = async () => {
try {
const response = await fetch(`${apiBaseUrl}/GisStationsStatic?idMap=12`);
const params = new URLSearchParams(window.location.search);
const idMap = params.get("idMap") || process.env.NEXT_PUBLIC_DEFAULT_ID_MAP || "12";
const idUser = params.get("idUser") || process.env.NEXT_PUBLIC_DEFAULT_ID_USER || "484";
const response = await fetch(`${apiBaseUrl}/GisStationsStatic?idMap=${idMap}`);
//console.log("📡 API Response Status:", response.status);
//console.log("📡 API Response Headers:", response.headers.get("content-type"));