1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-28 09:39:43 +02:00

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 c880a72f02
commit 948485c861
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,