|
|
|
|
@ -11,15 +11,17 @@ const createBoard = (projectId, data, headers) =>
|
|
|
|
|
const createBoardWithImport = (projectId, data, requestId, headers) =>
|
|
|
|
|
http.post(`/projects/${projectId}/boards?requestId=${requestId}`, data, headers);
|
|
|
|
|
|
|
|
|
|
const getBoard = (id, headers) =>
|
|
|
|
|
socket.get(`/boards/${id}`, undefined, headers).then((body) => ({
|
|
|
|
|
...body,
|
|
|
|
|
included: {
|
|
|
|
|
...body.included,
|
|
|
|
|
cards: body.included.cards.map(transformCard),
|
|
|
|
|
attachments: body.included.attachments.map(transformAttachment),
|
|
|
|
|
},
|
|
|
|
|
}));
|
|
|
|
|
const getBoard = (id, subscribe, headers) =>
|
|
|
|
|
socket
|
|
|
|
|
.get(`/boards/${id}${subscribe ? '?subscribe=true' : ''}`, undefined, headers)
|
|
|
|
|
.then((body) => ({
|
|
|
|
|
...body,
|
|
|
|
|
included: {
|
|
|
|
|
...body.included,
|
|
|
|
|
cards: body.included.cards.map(transformCard),
|
|
|
|
|
attachments: body.included.attachments.map(transformAttachment),
|
|
|
|
|
},
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
const updateBoard = (id, data, headers) => socket.patch(`/boards/${id}`, data, headers);
|
|
|
|
|
|
|
|
|
|
|