summaryrefslogtreecommitdiff
path: root/src/store/modules/HardwareStatus/MemoryStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/modules/HardwareStatus/MemoryStore.js')
-rw-r--r--src/store/modules/HardwareStatus/MemoryStore.js22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/store/modules/HardwareStatus/MemoryStore.js b/src/store/modules/HardwareStatus/MemoryStore.js
index dd6c9a51..ae30752d 100644
--- a/src/store/modules/HardwareStatus/MemoryStore.js
+++ b/src/store/modules/HardwareStatus/MemoryStore.js
@@ -71,19 +71,15 @@ const MemoryStore = {
},
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('pageMemory.toast.errorLimitUpdate'));