Letzte TDR-Messung anzeigen für ausgewählte Slot
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
// /services/fetchSingleTDRChartData.ts
|
||||
|
||||
export const fetchTDRChartDataBySlot = async (
|
||||
slot: number
|
||||
): Promise<any[] | null> => {
|
||||
const isDev = process.env.NEXT_PUBLIC_NODE_ENV === "development";
|
||||
|
||||
const url = isDev
|
||||
? `/CPLmockData/LastTDR/jsonDatei/slot${slot}.json`
|
||||
: `${window.location.origin}/CPL?/CPL/LastTDR/slot${slot}.json`;
|
||||
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error(`❌ Fehler beim Laden von slot${slot}:`, error);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -6,7 +6,7 @@ export const fetchTDRChartDataById = async (
|
||||
const isDev = process.env.NEXT_PUBLIC_NODE_ENV === "development";
|
||||
|
||||
const url = isDev
|
||||
? `http://localhost:3000/CPLmockData/Last100TDR/kue_01/id/${id}.json`
|
||||
? `http://localhost:3000/CPLmockData/TDR/${id}.json`
|
||||
: `${window.location.origin}/CPL?Service/empty.acp&TDR=${id}`;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user