TDR-Aktivieren und oder TDR-deaktivieren in Mock datei
This commit is contained in:
@@ -110,17 +110,19 @@ export default function TdrEinstellung({ slot }: Props) {
|
||||
const slotParam = `KTX${slot}=${newState ? 1 : 0}`;
|
||||
|
||||
if (isDev) {
|
||||
fetch(
|
||||
`/api/cpl/updateTdrSettingsDataAPIHandler?key=win_tdrActive&slot=${slot}&value=${
|
||||
newState ? 1 : 0
|
||||
}`
|
||||
)
|
||||
const updates = [{ key: "win_tdrActive", slot, value: newState ? 1 : 0 }];
|
||||
|
||||
fetch("/api/cpl/updateTdrSettingsDataAPIHandler", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ updates }),
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
console.log("Mock-Status aktualisiert:", data);
|
||||
.then(() => {
|
||||
console.log("TDR-Aktiv-Status gespeichert.");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error("Fehler in DEV-API:", err);
|
||||
console.error("Fehler beim Speichern von TDR aktiv:", err);
|
||||
});
|
||||
} else {
|
||||
const url = `${window.location.origin}/CPL?/kabelueberwachung.html&${slotParam}`;
|
||||
|
||||
Reference in New Issue
Block a user