fix: API-Endpoint in fetchLoopChartData auf slotDataAPIHandler umgestellt

- In Development wurde noch /api/cpl/slotData verwendet
- Korrekt ist jetzt /api/cpl/slotDataAPIHandler
- Fehler beim Laden der Chart-Daten behoben (Unexpected token '<')
- Dev und Prod Zugriff wieder sauber getrennt
This commit is contained in:
Ismail Ali
2025-04-15 17:43:27 +02:00
parent 025470defb
commit 2829f526a1
2 changed files with 3 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ export const useLoopChartLoader = () => {
type === 3 ? "isolationswiderstand" : "schleifenwiderstand"; type === 3 ? "isolationswiderstand" : "schleifenwiderstand";
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
return `/api/cpl/slotData?slot=${slotNumber}&messart=${typeFolder}&dia=${mode}&vonDatum=${vonDatum}&bisDatum=${bisDatum}`; return `/api/cpl/slotDataAPIHandler?slot=${slotNumber}&messart=${typeFolder}&dia=${mode}&vonDatum=${vonDatum}&bisDatum=${bisDatum}`;
} }
return `${window.location.origin}/CPL?seite.ACP&${mode}=${formatDate( return `${window.location.origin}/CPL?seite.ACP&${mode}=${formatDate(
@@ -112,7 +112,7 @@ const LoopChartActionBar: React.FC = () => {
const baseUrl = const baseUrl =
process.env.NODE_ENV === "development" process.env.NODE_ENV === "development"
? // ? `/CPLmockData/kuesChartData/slot${slotNumber}/${typeFolder}/${mode}.json` ? // ? `/CPLmockData/kuesChartData/slot${slotNumber}/${typeFolder}/${mode}.json`
`/api/cpl/slotData?slot=${slotNumber}&messart=${typeFolder}&dia=${mode}&vonDatum=${vonDatum}&bisDatum=${bisDatum}` `/api/cpl/slotDataAPIHandler?slot=${slotNumber}&messart=${typeFolder}&dia=${mode}&vonDatum=${vonDatum}&bisDatum=${bisDatum}`
: `${window.location.origin}/CPL?seite.ACP&${mode}=${formatDate( : `${window.location.origin}/CPL?seite.ACP&${mode}=${formatDate(
vonDatum vonDatum
)};${formatDate(bisDatum)};${slotNumber};${type};`; )};${formatDate(bisDatum)};${slotNumber};${type};`;

View File

@@ -6,5 +6,5 @@
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
*/ */
const webVersion = "1.6.227"; const webVersion = "1.6.228";
export default webVersion; export default webVersion;