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 {
}
update() {
const collapsed = !this.isExpanded;
return boardsStore.updateList(this.id, this.position, collapsed).catch(() => {
// TODO: handle request error
});
return boardsStore.updateListFunc(this);
}
nextPage() {
......
......@@ -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) {
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