feat: Referenzkurve-Button sendet API-Aufruf an Backend (KTR)

- handleSetReference um fetch-Aufruf ergänzt
- Unterscheidung von Entwicklungs- und Produktionsumgebung via NEXT_PUBLIC_API_BASE_URL
- Fehlerbehandlung und Alert bei Erfolg/Misserfolg eingebaut
This commit is contained in:
ISA
2025-03-31 10:05:36 +02:00
parent 14ba25bc57
commit 6b6b6cc9b8
4 changed files with 62 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ export const fetchTDRReferenceCurve = async (
const isDev = process.env.NEXT_PUBLIC_NODE_ENV === "development";
const url = isDev
? `/CPLmockData/tdr-reference-curves/slot${slot}.json`
: `${window.location.origin}/CPL?Service/empty.acp&TDRR=${slot}`;
: `${window.location.origin}/CPL?Service/empty.acp&TDR=${slot}`;
try {
const res = await fetch(url);