diff --git a/app/frontend/src/App.vue b/app/frontend/src/App.vue index b8668ba..846a3f8 100644 --- a/app/frontend/src/App.vue +++ b/app/frontend/src/App.vue @@ -55,11 +55,19 @@ this.set_lang(); }) .catch(error => { console.log(error) }); + }, + get_version: function() { + axios.get('/api/update/get-version', { timeout: 60000 }) + .then(response => { + if(response.data.status) window.current_version = response.data.current_version + }) + .catch(error => { console.log(error) }); } }, created: function() { window.config = {} this.get_config(); + this.get_version(); } } diff --git a/app/frontend/src/views/update.vue b/app/frontend/src/views/update.vue index d0ab38a..78d984e 100644 --- a/app/frontend/src/views/update.vue +++ b/app/frontend/src/views/update.vue @@ -23,7 +23,7 @@ } }, methods: { - check_update: function() { + check_version: function() { axios.get('/api/update/get-version', { timeout: 60000 }) .then(response => { if(response.data.status) { @@ -42,7 +42,7 @@ if(response.data.status) { if(response.data.message == "Update successfully launched"){ this.update_launched = true - this.check_interval = setInterval(function(){ this.check_update(); }.bind(this), 3000); + this.check_interval = setInterval(function(){ this.check_version(); }.bind(this), 3000); } } })