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

Fix attachment duplication on add

This commit is contained in:
Maksim Eltyshev 2020-04-23 05:56:02 +05:00
parent 3e85371da9
commit ce39b584ca
8 changed files with 36 additions and 7 deletions

View file

@ -10,8 +10,8 @@ export const transformAttachment = (attachment) => ({
/* Actions */
const createAttachment = (cardId, data, headers) =>
http.post(`/cards/${cardId}/attachments`, data, headers).then((body) => ({
const createAttachment = (cardId, data, requestId, headers) =>
http.post(`/cards/${cardId}/attachments?requestId=${requestId}`, data, headers).then((body) => ({
...body,
item: transformAttachment(body.item),
}));