Commit 254aaa2c authored by Simon Knox's avatar Simon Knox

fix board edit/creation to match shape BE expects

parent 8b2046d4
...@@ -30,20 +30,16 @@ class BoardService { ...@@ -30,20 +30,16 @@ class BoardService {
} }
createBoard (board) { createBoard (board) {
board.board = board.board || {}; board.label_ids = (board.labels || []).map(b => b.id);
board.board.label_ids = (board.labels || []).map(b => b.id);
if (board.assignee) { if (board.assignee) {
board.board.assignee_id = board.assignee.id; board.assignee_id = board.assignee.id;
} }
board.board.milestone_id = board.milestone_id;
board.board.weight = board.weight;
if (board.id) { if (board.id) {
return this.boards.update({ id: board.id }, board); return this.boards.update({ id: board.id }, { board });
} }
return this.boards.save({}, board); return this.boards.save({}, { board });
} }
all () { all () {
......
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