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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user