Struktur für components/main verbessert

This commit is contained in:
ISA
2025-02-13 15:28:35 +01:00
parent 42bff4b3ad
commit 3480efa754
16 changed files with 23 additions and 23 deletions

View File

@@ -0,0 +1,16 @@
const firmwareUpdate = (slot: number) => {
const url = `${window.location.origin}/CPL?/kabelueberwachung.html&KSU${slot}=1`;
fetch(url, { method: "GET" })
.then((response) => {
if (response.ok) {
alert(`Update an ${slot + 1} erfolgreich gestartet!`);
} else {
alert("Fehler beim Update!");
}
})
.catch((error) => {
console.error("Fehler:", error);
alert("Fehler beim Update!");
});
};
export default firmwareUpdate;