1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-29 18:19:46 +02:00

feat: Add ability to duplicate card (#668)

This commit is contained in:
Matthieu Bollot 2024-04-05 22:40:35 +02:00 committed by GitHub
parent 3091ad3121
commit 408ad9ff81
21 changed files with 505 additions and 6 deletions

View file

@ -57,6 +57,12 @@ const updateCard = (id, data, headers) =>
item: transformCard(body.item),
}));
const duplicateCard = (id, data, headers) =>
socket.post(`/cards/${id}/duplicate`, data, headers).then((body) => ({
...body,
item: transformCard(body.item),
}));
const deleteCard = (id, headers) =>
socket.delete(`/cards/${id}`, undefined, headers).then((body) => ({
...body,
@ -81,6 +87,7 @@ export default {
getCard,
updateCard,
deleteCard,
duplicateCard,
makeHandleCardCreate,
makeHandleCardUpdate,
makeHandleCardDelete,