feat: Projekt von JavaScript zu TypeScript migriert

This commit is contained in:
Ismail Ali
2025-01-25 00:20:19 +01:00
parent fde7cf33c4
commit 4f809877ea
45 changed files with 579 additions and 291 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;