summaryrefslogtreecommitdiff
path: root/src/store
diff options
context:
space:
mode:
Diffstat (limited to 'src/store')
-rw-r--r--src/store/modules/Control/ServerLedStore.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/store/modules/Control/ServerLedStore.js b/src/store/modules/Control/ServerLedStore.js
index d7c12344..a8903e2a 100644
--- a/src/store/modules/Control/ServerLedStore.js
+++ b/src/store/modules/Control/ServerLedStore.js
@@ -27,12 +27,12 @@ const ServerLedStore = {
.catch((error) => console.log(error));
},
async saveIndicatorLedActiveState({ commit }, payload) {
+ commit('setIndicatorLedActiveState', payload);
return await api
.patch('/redfish/v1/Systems/system', {
LocationIndicatorActive: payload,
})
.then(() => {
- commit('setIndicatorLedActiveState', payload);
if (payload) {
return i18n.t('pageServerLed.toast.successServerLedOn');
} else {
@@ -41,6 +41,7 @@ const ServerLedStore = {
})
.catch((error) => {
console.log(error);
+ commit('setIndicatorLedActiveState', !payload);
if (payload) {
throw new Error(i18n.t('pageServerLed.toast.errorServerLedOn'));
} else {