Skip to content

Commit

Permalink
Call the refresh command after the update has been completed
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Sep 25, 2020
1 parent 9427dde commit ce3b1e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/src/http/ApplicationHttpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ class ApplicationHttpClient {

return HttpClient.request(method, url, null);
}

static refresh() {
const method = 'POST';

const url = 'refresh';

return HttpClient.request(method, url, null);
}
}

export default ApplicationHttpClient;
1 change: 1 addition & 0 deletions client/src/stores/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class ApplicationStore {
async update() {
try {
await ApplicationHttpClient.update();
await ApplicationHttpClient.refresh();
this.success(translate('application.updateSuccess'));
setTimeout(() => window.location.reload(), 3000);
} catch (error) {
Expand Down

0 comments on commit ce3b1e8

Please sign in to comment.