Mocks erstellt für API für Entwicklungsumgebung
This commit is contained in:
@@ -7,7 +7,7 @@ export const fetchAllTDMDataFromServer = async (): Promise<any[]> => {
|
||||
|
||||
const slotRequests = Array.from({ length: 32 }, (_, i) => {
|
||||
const url = isDev
|
||||
? `/apiMockData/TDM/slot${i}.json` // ✅ Entwicklung: aus public-Ordner
|
||||
? `/device-cgi-simulator/TDM/slot${i}.json` // ✅ Entwicklung: aus public-Ordner
|
||||
: `${window.location.origin}/CPL?Service/empty.acp&TDM=${i}`; // ✅ Produktion
|
||||
|
||||
return fetch(url)
|
||||
|
||||
@@ -4,7 +4,7 @@ export const fetchAllTDRChartDataFromServer = async (): Promise<any[]> => {
|
||||
const isDev = process.env.NEXT_PUBLIC_NODE_ENV === "development";
|
||||
|
||||
const basePath = isDev
|
||||
? "/apiMockData/LastTDR/jsonDatei"
|
||||
? "/device-cgi-simulator/LastTDR/jsonDatei"
|
||||
: "/CPL?/CPL/LastTDR";
|
||||
|
||||
const fileNames = Array.from({ length: 32 }, (_, i) => `slot${i}.json`);
|
||||
|
||||
@@ -4,7 +4,7 @@ const getTDRReferenceBasePath = () => {
|
||||
if (typeof window !== "undefined") {
|
||||
const env = process.env.NEXT_PUBLIC_NODE_ENV;
|
||||
return env === "development"
|
||||
? "/apiMockData/tdr-reference-curves"
|
||||
? "/device-cgi-simulator/tdr-reference-curves"
|
||||
: "/CPL?/CPL/tdr-reference-curves";
|
||||
}
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user