Skip to content

Commit

Permalink
Block other actions during update
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed May 30, 2018
1 parent a8ab590 commit 4c27804
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions settings/src/store/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,17 @@ const actions = {
updateApp(context, { appId }) {
return api.requireAdmin().then((response) => {
context.commit('startLoading', appId);
context.commit('startLoading', 'install');
return api.get(OC.generateUrl(`settings/apps/update/${appId}`))
.then((response) => {
context.commit('stopLoading', 'install');
context.commit('stopLoading', appId);
context.commit('updateApp', appId);
return true;
})
.catch((error) => {
context.commit('stopLoading', appId);
context.commit('stopLoading', 'install');
context.commit('APPS_API_FAILURE', { appId, error })
})
}).catch((error) => context.commit('API_FAILURE', { appId, error }));
Expand Down

0 comments on commit 4c27804

Please sign in to comment.