summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Tickett <lee@tickett.net>2019-09-03 16:38:17 +0000
committerClement Ho <408677-ClemMakesApps@users.noreply.gitlab.com>2019-09-03 16:38:17 +0000
commitc487c7cf6a360916b69e015b6571820b9e827236 (patch)
treea3076f26dfab9c53a458f58b42102868a672cd7b
parent3d8d394c9741fc41d272b970d257743079ef621c (diff)
downloadgitlab-ce-c487c7cf6a360916b69e015b6571820b9e827236.tar.gz
Revert "DB change, migratoin and changelog"
This reverts commit af5242ecb682189c5d8276e1ab1ffe5ce844f2e5.
-rw-r--r--app/assets/javascripts/boards/models/issue.js4
-rw-r--r--changelogs/unreleased/remove-vue-resource-from-issue.yml5
-rw-r--r--spec/javascripts/boards/issue_spec.js6
3 files changed, 10 insertions, 5 deletions
diff --git a/app/assets/javascripts/boards/models/issue.js b/app/assets/javascripts/boards/models/issue.js
index 9069b35db9a..086340105b7 100644
--- a/app/assets/javascripts/boards/models/issue.js
+++ b/app/assets/javascripts/boards/models/issue.js
@@ -3,7 +3,7 @@
/* global ListMilestone */
/* global ListAssignee */
-import Vue from 'vue';
+import axios from '~/lib/utils/axios_utils';
import './label';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import IssueProject from './project';
@@ -133,7 +133,7 @@ class ListIssue {
}
const projectPath = this.project ? this.project.path : '';
- return Vue.http.patch(`${this.path}.json`, data).then(({ body = {} } = {}) => {
+ return axios.patch(`${this.path}.json`, data).then(({ data: body = {} } = {}) => {
/**
* Since post implementation of Scoped labels, server can reject
* same key-ed labels. To keep the UI and server Model consistent,
diff --git a/changelogs/unreleased/remove-vue-resource-from-issue.yml b/changelogs/unreleased/remove-vue-resource-from-issue.yml
new file mode 100644
index 00000000000..b2de1b0913a
--- /dev/null
+++ b/changelogs/unreleased/remove-vue-resource-from-issue.yml
@@ -0,0 +1,5 @@
+---
+title: Remove vue resource from issue
+merge_request: 32421
+author: Lee Tickett
+type: other
diff --git a/spec/javascripts/boards/issue_spec.js b/spec/javascripts/boards/issue_spec.js
index bb7abe52eae..05e6ea1394d 100644
--- a/spec/javascripts/boards/issue_spec.js
+++ b/spec/javascripts/boards/issue_spec.js
@@ -1,6 +1,6 @@
/* global ListIssue */
-import Vue from 'vue';
+import axios from '~/lib/utils/axios_utils';
import '~/boards/models/label';
import '~/boards/models/assignee';
import '~/boards/models/issue';
@@ -175,7 +175,7 @@ describe('Issue model', () => {
describe('update', () => {
it('passes assignee ids when there are assignees', done => {
- spyOn(Vue.http, 'patch').and.callFake((url, data) => {
+ spyOn(axios, 'patch').and.callFake((url, data) => {
expect(data.issue.assignee_ids).toEqual([1]);
done();
return Promise.resolve();
@@ -185,7 +185,7 @@ describe('Issue model', () => {
});
it('passes assignee ids of [0] when there are no assignees', done => {
- spyOn(Vue.http, 'patch').and.callFake((url, data) => {
+ spyOn(axios, 'patch').and.callFake((url, data) => {
expect(data.issue.assignee_ids).toEqual([0]);
done();
return Promise.resolve();