diff --git a/resources/assets/js/views/modules/item.js b/resources/assets/js/views/modules/item.js index a8ea53787..f67557b97 100644 --- a/resources/assets/js/views/modules/item.js +++ b/resources/assets/js/views/modules/item.js @@ -65,12 +65,13 @@ const app = new Vue({ location = path; }, - onGetReviews (path, page) { - axios.post(url + '/apps/' + app_slug + '/reviews', { + async onGetReviews(path, page) { + let reviews_promise = Promise.resolve(axios.post(url + '/apps/' + app_slug + '/reviews', { patth: path, page: page - }) - .then(response => { + })); + + reviews_promise.then(response => { this.reviews = response.data.html; }) .catch(error => { @@ -81,17 +82,18 @@ const app = new Vue({ this.faq = true; }, - onInstall(path, name, version) { + async onInstall(path, name, version) { this.installation.show = true; this.installation.total = 0; this.installation.path = path; this.installation.version = version; - axios.post(url + '/apps/steps', { + let steps_promise = Promise.resolve(axios.post(url + '/apps/steps', { name: name, version: version - }) - .then(response => { + })); + + steps_promise.then(response => { if (response.data.error) { this.installation.status = 'exception'; this.installation.html = '