This commit is contained in:
Joel Collins 2020-03-13 16:45:29 +00:00
parent 6b0359e432
commit 84fe22275b

View file

@ -181,14 +181,10 @@ export default {
this.modalConfirm("Shut down microscope?").then(
() => {
if ("shutdown" in this.systemActionLinks) {
axios
.post(this.systemActionLinks.shutdown)
.catch(error => {
this.modalError(error); // Let mixin handle error
})
.finally(() => {
this.$store.commit("resetState");
});
this.$store.commit("resetState");
axios.post(this.systemActionLinks.shutdown).catch(error => {
console.log(error); // Be quiet when empty response is recieved
});
}
},
() => {}
@ -198,14 +194,10 @@ export default {
this.modalConfirm("Restart microscope?").then(
() => {
if ("reboot" in this.systemActionLinks) {
axios
.post(this.systemActionLinks.reboot)
.catch(error => {
this.modalError(error); // Let mixin handle error
})
.finally(() => {
this.$store.commit("resetState");
});
this.$store.commit("resetState");
axios.post(this.systemActionLinks.reboot).catch(error => {
console.log(error); // Be quiet when empty response is recieved
});
}
},
() => {}