diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-01-27 16:21:11 -0200 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-02-03 17:02:44 +0300 |
commit | 274987d5c0f7b04a9b7510c318c8df6dfab477df (patch) | |
tree | 965fd6bb67839793d6c7757a74d1290a6bc0f89d /app/assets/javascripts/boards | |
parent | 7f58fc0e997a6784d978396747f39ce573dfe289 (diff) | |
download | gitlab-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.es6 | 2 | ||||
-rw-r--r-- | app/assets/javascripts/boards/services/board_service.js.es6 | 6 |
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); } } |