Files
CPLv4.0/components/modales/kueModal/handlers/firmwareUpdate.js

17 lines
474 B
JavaScript

const firmwareUpdate = (slot) => {
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;