Updated to new API structure

This commit is contained in:
Joel Collins 2020-01-14 16:10:05 +00:00
parent 733b6f4b61
commit fcdb30eedf
11 changed files with 113 additions and 115 deletions

View file

@ -144,16 +144,14 @@ export default {
.get(this.actionsUri)
.then(response => {
if ("reboot" in response.data) {
this.systemActionLinks.reboot = `${this.$store.getters.baseUri}${
response.data.reboot.links.self
}`;
this.systemActionLinks.reboot =
response.data.reboot.links.self.href;
} else {
delete this.systemActionLinks.reboot;
}
if ("shutdown" in response.data) {
this.systemActionLinks.shutdown = `${this.$store.getters.baseUri}${
response.data.shutdown.links.self
}`;
this.systemActionLinks.shutdown =
response.data.shutdown.links.self.href;
} else {
delete this.systemActionLinks.shutdown;
}