Commit 5052d5ac authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'Remove-update-fuction-logic-from-list-model' into 'master'

Remove update  function logic from List model

See merge request gitlab-org/gitlab!31900
parents 9e7751b4 6b966b41
...@@ -93,10 +93,7 @@ class List { ...@@ -93,10 +93,7 @@ class List {
} }
update() { update() {
const collapsed = !this.isExpanded; return boardsStore.updateListFunc(this);
return boardsStore.updateList(this.id, this.position, collapsed).catch(() => {
// TODO: handle request error
});
} }
nextPage() { nextPage() {
......
...@@ -537,6 +537,13 @@ const boardsStore = { ...@@ -537,6 +537,13 @@ const boardsStore = {
}); });
}, },
updateListFunc(list) {
const collapsed = !list.isExpanded;
return this.updateList(list.id, list.position, collapsed).catch(() => {
// TODO: handle request error
});
},
destroyList(id) { destroyList(id) {
return axios.delete(`${this.state.endpoints.listsEndpoint}/${id}`); return axios.delete(`${this.state.endpoints.listsEndpoint}/${id}`);
}, },
......
---
title: Remove update function logic from list model
merge_request: 31900
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