Commit 6b966b41 authored by Marvin Karegyeya's avatar Marvin Karegyeya Committed by Kushal Pandya

Remove update function logic from List model

parent aa777b17
...@@ -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() {
......
...@@ -516,6 +516,13 @@ const boardsStore = { ...@@ -516,6 +516,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