feat: Healthcheck um Webservices, API-Routen und .env-Prüfungen erweitert
- Externe Webservices von TALAS V5 integriert und geprüft (Statuscode + Antwortstruktur) - Eigene API-Endpunkte wie /api/talas_v5_DB/getDevices hinzugefügt und validiert - Prüfung von NEXT_PUBLIC_USE_MOCKS zur Vermeidung von Mockdaten in Produktion - Validierung der Umgebungsvariablen wie DB_HOST, DB_NAME und NODE_ENV ergänzt - Response-Status 200 bei vollständigem Erfolg, 207 bei Teilfehlern - Verbesserung der JSON-Antwortstruktur zur einfacheren Analyse
This commit is contained in:
@@ -5,7 +5,15 @@ import "leaflet/dist/leaflet.css";
|
||||
import "leaflet-contextmenu/dist/leaflet.contextmenu.css";
|
||||
import "overlapping-marker-spiderfier-leaflet";
|
||||
|
||||
export const initializeMap = (mapRef, setMap, setOms, setMenuItemAdded, addItemsToMapContextMenu, hasRights, setPolylineEventsDisabled) => {
|
||||
export const initializeMap = (
|
||||
mapRef,
|
||||
setMap,
|
||||
setOms,
|
||||
setMenuItemAdded,
|
||||
addItemsToMapContextMenu,
|
||||
hasRights,
|
||||
setPolylineEventsDisabled
|
||||
) => {
|
||||
const basePath = process.env.NEXT_PUBLIC_BASE_PATH;
|
||||
|
||||
if (!mapRef.current) {
|
||||
@@ -14,7 +22,9 @@ export const initializeMap = (mapRef, setMap, setOms, setMenuItemAdded, addItems
|
||||
}
|
||||
|
||||
if (mapRef.current._leaflet_id) {
|
||||
console.log("⚠️ Karte bereits initialisiert");
|
||||
if (process.env.NEXT_PUBLIC_DEBUG_LOG === "true") {
|
||||
console.log("⚠️ Karte bereits initialisiert");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user