diff options
author | Bryce Johnson <bryce@gitlab.com> | 2017-04-10 13:47:54 -0400 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2017-04-10 13:47:54 -0400 |
commit | 8f2ab9598545282ff8641ecb74f3609d292cdec2 (patch) | |
tree | 57150d7f1c0aaaa1ac063334451cbbb32efcfd38 | |
parent | d049b3780484e16f0e717e2ab90af75958515136 (diff) | |
download | gitlab-ce-27056-upgrade-vue-resource-to-1-0-3-to-fix-http-case-problems.tar.gz |
Update title and pipelines refs.27056-upgrade-vue-resource-to-1-0-3-to-fix-http-case-problems
-rw-r--r-- | app/assets/javascripts/commit/pipelines/pipelines_table.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/issue_show/issue_title.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/vue_pipelines_index/pipelines.js | 12 |
3 files changed, 7 insertions, 9 deletions
diff --git a/app/assets/javascripts/commit/pipelines/pipelines_table.js b/app/assets/javascripts/commit/pipelines/pipelines_table.js index 1d16c64e07e..509630f809b 100644 --- a/app/assets/javascripts/commit/pipelines/pipelines_table.js +++ b/app/assets/javascripts/commit/pipelines/pipelines_table.js @@ -125,7 +125,7 @@ export default Vue.component('pipelines-table', { }, successCallback(resp) { - const response = resp.json(); + const response = resp.body; // depending of the endpoint the response can either bring a `pipelines` key or not. const pipelines = response.pipelines || response; diff --git a/app/assets/javascripts/issue_show/issue_title.js b/app/assets/javascripts/issue_show/issue_title.js index 1184c8956dc..b7e82bc7130 100644 --- a/app/assets/javascripts/issue_show/issue_title.js +++ b/app/assets/javascripts/issue_show/issue_title.js @@ -45,7 +45,7 @@ export default { }); }, renderResponse(res) { - const body = JSON.parse(res.body); + const body = res.body; this.triggerAnimation(body); }, triggerAnimation(body) { diff --git a/app/assets/javascripts/vue_pipelines_index/pipelines.js b/app/assets/javascripts/vue_pipelines_index/pipelines.js index 6eea4812f33..f3429817ac5 100644 --- a/app/assets/javascripts/vue_pipelines_index/pipelines.js +++ b/app/assets/javascripts/vue_pipelines_index/pipelines.js @@ -198,14 +198,12 @@ export default { }, successCallback(resp) { - const response = { - headers: resp.headers, - body: resp.json(), - }; + const body = resp.body; + const headers = resp.headers; - this.store.storeCount(response.body.count); - this.store.storePipelines(response.body.pipelines); - this.store.storePagination(response.headers); + this.store.storeCount(body.count); + this.store.storePipelines(body.pipelines); + this.store.storePagination(headers); this.isLoading = false; }, |