diff options
Diffstat (limited to 'src/store/modules/HardwareStatus/MotherboardStore.js')
-rw-r--r-- | src/store/modules/HardwareStatus/MotherboardStore.js | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/store/modules/HardwareStatus/MotherboardStore.js b/src/store/modules/HardwareStatus/MotherboardStore.js index e565eaa0..0f54b529 100644 --- a/src/store/modules/HardwareStatus/MotherboardStore.js +++ b/src/store/modules/HardwareStatus/MotherboardStore.js @@ -26,19 +26,15 @@ const MotherboardStore = { }, actions: { async patchLimits({ dispatch }, { warning, groups }) { - return Promise.all( - groups.map( - async (group) => - await api.patch('/redfish/v1/Chassis/SILA_Baseboard/Thermal', { - Temperatures: [ - { - MemberId: group, - UpperThresholdNonCritical: warning, - }, - ], - }) - ) - ) + return await api + .patch('/redfish/v1/Chassis/SILA_Baseboard/Thermal', { + Temperatures: groups.map((group) => { + return { + MemberId: group, + UpperThresholdNonCritical: warning, + }; + }), + }) .catch((error) => { console.log(error); throw new Error(i18n.t('pageMotherboard.toast.errorLimitUpdate')); |