fix: API Endpoint in fetchOpcUaSettingsService für Development korrigiert
- falsches .js im API Pfad entfernt - Development lädt jetzt korrekt /api/cpl/opcuaAPIHandler - Production bleibt unverändert
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// ✅ Service: /services/fetchDigitalOutputsService.ts
|
||||
|
||||
export const fetchDigitalOutputs = async () => {
|
||||
export const fetchDigitalOutputsService = async () => {
|
||||
if (typeof window === "undefined") return [];
|
||||
|
||||
const scriptSrc =
|
||||
process.env.NEXT_PUBLIC_NODE_ENV === "production"
|
||||
? "/CPL?/CPL/SERVICE/da.js"
|
||||
: "/apiMockData/SERVICE/da.js";
|
||||
: "/api/cpl/digitaleAusgaengeAPIHandler";
|
||||
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
const script = document.createElement("script");
|
||||
|
||||
Reference in New Issue
Block a user