Commit 8f87bd8c authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'Remove-destroy-function-logic-from-list-model' into 'master'

Remove destroy function logic from list model

See merge request gitlab-org/gitlab!32237
parents 4786fe61 59300f29
......@@ -83,13 +83,7 @@ class List {
}
destroy() {
const index = boardsStore.state.lists.indexOf(this);
boardsStore.state.lists.splice(index, 1);
boardsStore.updateNewListDropdown(this.id);
boardsStore.destroyList(this.id).catch(() => {
// TODO: handle request error
});
boardsStore.destroy(this);
}
update() {
......
......@@ -547,6 +547,15 @@ const boardsStore = {
destroyList(id) {
return axios.delete(`${this.state.endpoints.listsEndpoint}/${id}`);
},
destroy(list) {
const index = this.state.lists.indexOf(list);
this.state.lists.splice(index, 1);
this.updateNewListDropdown(list.id);
this.destroyList(list.id).catch(() => {
// TODO: handle request error
});
},
saveList(list) {
const entity = list.label || list.assignee || list.milestone;
......
---
title: Remove destroy function logic from list model
merge_request: 32237
author: nuwe1
type: other
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