From ce3b1e89b524be64ea103f6d8fdb463247f86f7f Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 25 Sep 2020 13:30:55 +0300 Subject: [PATCH] Call the refresh command after the update has been completed --- client/src/http/ApplicationHttpClient.js | 8 ++++++++ client/src/stores/application.js | 1 + 2 files changed, 9 insertions(+) diff --git a/client/src/http/ApplicationHttpClient.js b/client/src/http/ApplicationHttpClient.js index 25a9f23..0b67eb5 100644 --- a/client/src/http/ApplicationHttpClient.js +++ b/client/src/http/ApplicationHttpClient.js @@ -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; diff --git a/client/src/stores/application.js b/client/src/stores/application.js index e765874..abfbd13 100644 --- a/client/src/stores/application.js +++ b/client/src/stores/application.js @@ -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) {