Commit 4baff23d authored by nuwe1's avatar nuwe1

remove newIssue function logic from list model

parent ee8c4dbc
...@@ -114,13 +114,7 @@ class List { ...@@ -114,13 +114,7 @@ class List {
} }
newIssue(issue) { newIssue(issue) {
this.addIssue(issue, null, 0); return boardsStore.newListIssue(issue);
this.issuesSize += 1;
return boardsStore
.newIssue(this.id, issue)
.then(res => res.data)
.then(data => this.onNewIssueResponse(issue, data));
} }
createIssues(data) { createIssues(data) {
......
...@@ -607,6 +607,15 @@ const boardsStore = { ...@@ -607,6 +607,15 @@ const boardsStore = {
}); });
}, },
newListIssue(issue) {
list.addIssue(issue, null, 0);
list.issuesSize += 1;
return this.newIssue(list.id, issue)
.then(res => res.data)
.then(data => list.onNewIssueResponse(issue, data));
},
getBacklog(data) { getBacklog(data) {
return axios.get( return axios.get(
mergeUrlParams( mergeUrlParams(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment