diff --git a/apps/settings/src/components/AppList.vue b/apps/settings/src/components/AppList.vue index f2892854b4355..ccab6708fe029 100644 --- a/apps/settings/src/components/AppList.vue +++ b/apps/settings/src/components/AppList.vue @@ -351,13 +351,14 @@ export default { }) }, - updateAll() { + async updateAll() { const limit = pLimit(1) - this.apps + const updateTasks = this.apps .filter((app) => app.update) .map((app) => limit(() => { this.update(app.id) })) + await Promise.all(updateTasks) }, }, } diff --git a/apps/settings/src/mixins/AppManagement.js b/apps/settings/src/mixins/AppManagement.js index f8b53f41fbf75..6f97d05775657 100644 --- a/apps/settings/src/mixins/AppManagement.js +++ b/apps/settings/src/mixins/AppManagement.js @@ -255,11 +255,11 @@ export default { }, update(appId) { if (this.app?.app_api) { - this.appApiStore.updateApp(appId) + return this.appApiStore.updateApp(appId) .then(() => { rebuildNavigation() }) .catch((error) => { showError(error) }) } else { - this.$store.dispatch('updateApp', { appId }) + return this.$store.dispatch('updateApp', { appId }) .catch((error) => { showError(error) }) .then(() => { rebuildNavigation()