diff options
author | Simon Knox <psimyn@gmail.com> | 2017-09-06 16:26:48 +1000 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2017-09-06 16:26:48 +1000 |
commit | 6fa533c413c45c0eda4d673458f014bd0fc52130 (patch) | |
tree | 523166b58584f4386afaef99c2fd4b051e3bab67 /app/assets/javascripts/boards | |
parent | 4a0010bdb2b1329c83564f5a7c0ed061a5c77eeb (diff) | |
download | gitlab-ce-6fa533c413c45c0eda4d673458f014bd0fc52130.tar.gz |
missing js change
Diffstat (limited to 'app/assets/javascripts/boards')
-rw-r--r-- | app/assets/javascripts/boards/services/board_service.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/assets/javascripts/boards/services/board_service.js b/app/assets/javascripts/boards/services/board_service.js index 3742507b236..38eea38f949 100644 --- a/app/assets/javascripts/boards/services/board_service.js +++ b/app/assets/javascripts/boards/services/board_service.js @@ -3,21 +3,21 @@ import Vue from 'vue'; class BoardService { - constructor (root, bulkUpdatePath, boardId) { - this.boards = Vue.resource(`${root}{/id}.json`, {}, { + constructor ({ boardsEndpoint, listsEndpoint, bulkUpdatePath, boardId }) { + this.boards = Vue.resource(`${boardsEndpoint}{/id}.json`, {}, { issues: { method: 'GET', - url: `${root}/${boardId}/issues.json` + url: `${gon.relative_url_root}/boards/${boardId}/issues.json`, } }); - this.lists = Vue.resource(`${root}/${boardId}/lists{/id}`, {}, { + this.lists = Vue.resource(`${listsEndpoint}{/id}`, {}, { generate: { method: 'POST', - url: `${root}/${boardId}/lists/generate.json` + url: `${listsEndpoint}/generate.json` } }); - this.issue = Vue.resource(`${root}/${boardId}/issues{/id}`, {}); - this.issues = Vue.resource(`${root}/${boardId}/lists{/id}/issues`, {}, { + this.issue = Vue.resource(`${gon.relative_url_root}/boards/${boardId}/issues{/id}`, {}); + this.issues = Vue.resource(`${listsEndpoint}{/id}/issues`, {}, { bulkUpdate: { method: 'POST', url: bulkUpdatePath, @@ -60,12 +60,12 @@ class BoardService { return this.issues.get(data); } - moveIssue (id, from_list_id = null, to_list_id = null, move_before_iid = null, move_after_iid = null) { + moveIssue (id, from_list_id = null, to_list_id = null, move_before_id = null, move_after_id = null) { return this.issue.update({ id }, { from_list_id, to_list_id, - move_before_iid, - move_after_iid, + move_before_id, + move_after_id, }); } |