feat: Improve security of access tokens (#279)

Closes #275
This commit is contained in:
SimonTagne
2022-08-09 18:03:21 +02:00
committed by GitHub
parent dab38cbc18
commit 7786533a90
40 changed files with 273 additions and 133 deletions

View File

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