summaryrefslogtreecommitdiff
path: root/src/store
diff options
context:
space:
mode:
Diffstat (limited to 'src/store')
-rw-r--r--src/store/modules/HardwareStatus/ProcessorStore.js27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/store/modules/HardwareStatus/ProcessorStore.js b/src/store/modules/HardwareStatus/ProcessorStore.js
index c7cbbeea..1c91eacb 100644
--- a/src/store/modules/HardwareStatus/ProcessorStore.js
+++ b/src/store/modules/HardwareStatus/ProcessorStore.js
@@ -81,22 +81,17 @@ const ProcessorStore = {
const updatedIdentifyLedValue = {
LocationIndicatorActive: led.identifyLed,
};
- return await api
- .patch(uri, updatedIdentifyLedValue)
- .then(() => dispatch('getProcessorsInfo'))
- .catch((error) => {
- dispatch('getProcessorsInfo');
- console.log('error', error);
- if (led.identifyLed) {
- throw new Error(
- i18n.t('pageInventory.toast.errorEnableIdentifyLed')
- );
- } else {
- throw new Error(
- i18n.t('pageInventory.toast.errorDisableIdentifyLed')
- );
- }
- });
+ return await api.patch(uri, updatedIdentifyLedValue).catch((error) => {
+ dispatch('getProcessorsInfo');
+ console.log('error', error);
+ if (led.identifyLed) {
+ throw new Error(i18n.t('pageInventory.toast.errorEnableIdentifyLed'));
+ } else {
+ throw new Error(
+ i18n.t('pageInventory.toast.errorDisableIdentifyLed')
+ );
+ }
+ });
},
},
};