diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-12-14 22:52:18 -0600 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2018-01-02 17:59:04 -0600 |
commit | d2e5313ad8134167ae1838b08dd8f20ed5a0261d (patch) | |
tree | b0e005f5944f9ec9f184975b2a3362ba2b960d81 /app/assets/javascripts/issue_show/components/app.vue | |
parent | b7da615c0dadced8e16c839ce8c66550e9327989 (diff) | |
download | gitlab-ce-d2e5313ad8134167ae1838b08dd8f20ed5a0261d.tar.gz |
Switch issue_show to Axios
Diffstat (limited to 'app/assets/javascripts/issue_show/components/app.vue')
-rw-r--r-- | app/assets/javascripts/issue_show/components/app.vue | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue index 952f49d522e..fc10a43d1bf 100644 --- a/app/assets/javascripts/issue_show/components/app.vue +++ b/app/assets/javascripts/issue_show/components/app.vue @@ -172,8 +172,8 @@ export default { }, updateIssuable() { - this.service.updateIssuable(this.store.formState) - .then(res => res.json()) + return this.service.updateIssuable(this.store.formState) + .then(res => res.data) .then(data => this.checkForSpam(data)) .then((data) => { if (location.pathname !== data.web_url) { @@ -182,7 +182,7 @@ export default { return this.service.getData(); }) - .then(res => res.json()) + .then(res => res.data) .then((data) => { this.store.updateState(data); eventHub.$emit('close.form'); @@ -207,7 +207,7 @@ export default { deleteIssuable() { this.service.deleteIssuable() - .then(res => res.json()) + .then(res => res.data) .then((data) => { // Stop the poll so we don't get 404's with the issuable not existing this.poll.stop(); @@ -225,7 +225,7 @@ export default { this.poll = new Poll({ resource: this.service, method: 'getData', - successCallback: res => res.json().then(data => this.store.updateState(data)), + successCallback: res => this.store.updateState(res.data), errorCallback(err) { throw new Error(err); }, |