summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/boards
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-01-27 16:21:11 -0200
committerFatih Acet <acetfatih@gmail.com>2017-02-03 17:02:44 +0300
commit274987d5c0f7b04a9b7510c318c8df6dfab477df (patch)
tree965fd6bb67839793d6c7757a74d1290a6bc0f89d /app/assets/javascripts/boards
parent7f58fc0e997a6784d978396747f39ce573dfe289 (diff)
downloadgitlab-ce-274987d5c0f7b04a9b7510c318c8df6dfab477df.tar.gz
Reuse endpoint to list issues for a list instead of create a new one
Diffstat (limited to 'app/assets/javascripts/boards')
-rw-r--r--app/assets/javascripts/boards/components/modal/index.js.es62
-rw-r--r--app/assets/javascripts/boards/services/board_service.js.es66
2 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/boards/components/modal/index.js.es6 b/app/assets/javascripts/boards/components/modal/index.js.es6
index eedfd826787..ababe3af0e3 100644
--- a/app/assets/javascripts/boards/components/modal/index.js.es6
+++ b/app/assets/javascripts/boards/components/modal/index.js.es6
@@ -48,7 +48,7 @@
}).then((res) => {
const data = res.json();
- data.forEach((issueObj) => {
+ data.issues.forEach((issueObj) => {
const issue = new ListIssue(issueObj);
const foundSelectedIssue = ModalStore.findSelectedIssue(issue);
issue.selected = foundSelectedIssue !== undefined;
diff --git a/app/assets/javascripts/boards/services/board_service.js.es6 b/app/assets/javascripts/boards/services/board_service.js.es6
index 20df8f2b373..993f8599fd4 100644
--- a/app/assets/javascripts/boards/services/board_service.js.es6
+++ b/app/assets/javascripts/boards/services/board_service.js.es6
@@ -4,9 +4,9 @@
class BoardService {
constructor (root, boardId) {
this.boards = Vue.resource(`${root}{/id}.json`, {}, {
- backlog: {
+ issues: {
method: 'GET',
- url: `${root}/${boardId}/backlog.json`
+ url: `${root}/${boardId}/issues.json`
}
});
this.lists = Vue.resource(`${root}/${boardId}/lists{/id}`, {}, {
@@ -73,7 +73,7 @@ class BoardService {
}
getBacklog(data) {
- return this.boards.backlog(data);
+ return this.boards.issues(data);
}
}