feat: Trello board JSON import (#352)

Closes #27, closes #105
This commit is contained in:
Christoph Enne
2022-12-16 23:48:06 +01:00
committed by GitHub
parent 9ce8b2ab9c
commit 738ed19e7f
20 changed files with 537 additions and 89 deletions

View File

@@ -1,4 +1,5 @@
import socket from './socket';
import http from './http';
import { transformCard } from './cards';
import { transformAttachment } from './attachments';
@@ -7,6 +8,9 @@ import { transformAttachment } from './attachments';
const createBoard = (projectId, data, headers) =>
socket.post(`/projects/${projectId}/boards`, 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,
@@ -23,6 +27,7 @@ const deleteBoard = (id, headers) => socket.delete(`/boards/${id}`, undefined, h
export default {
createBoard,
createBoardWithImport,
getBoard,
updateBoard,
deleteBoard,