summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-09-15 10:55:28 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-09-15 10:55:28 +0300
commitbfa4d393df5f8a4062d87e8ddee3d31c6f5fa258 (patch)
tree420c7567abe423eb88a5dda4051ce8890a39925b /src
parent0e03dcebc5da6107b8a9ded541a2cc21ae129d78 (diff)
downloadwebui-vue-bfa4d393df5f8a4062d87e8ddee3d31c6f5fa258.tar.xz
add await for get subscribers
Diffstat (limited to 'src')
-rw-r--r--src/store/modules/Settings/SnmpStore.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/store/modules/Settings/SnmpStore.js b/src/store/modules/Settings/SnmpStore.js
index 1290bf8f..3fda494f 100644
--- a/src/store/modules/Settings/SnmpStore.js
+++ b/src/store/modules/Settings/SnmpStore.js
@@ -12,8 +12,8 @@ const SnmpStore = {
async deleteSubscriber({ dispatch }, index) {
return await api
.delete(`/redfish/v1/EventService/Subscriptions/${index}`)
- .then(() => {
- dispatch('getSubscribers');
+ .then(async () => {
+ await dispatch('getSubscribers');
return i18n.t('pageTransfer.snmp.deleteSubscriberSuсcess');
})
.catch((error) => {
@@ -24,8 +24,8 @@ const SnmpStore = {
async addSubscriber({ dispatch }, payload) {
return await api
.post('/redfish/v1/EventService/Subscriptions', payload)
- .then(() => {
- dispatch('getSubscribers');
+ .then(async () => {
+ await dispatch('getSubscribers');
return i18n.t('pageTransfer.snmp.saveSubscriberSuсcess');
})
.catch((error) => {