update attachment

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2020-02-21 12:08:24 +01:00
committed by Julius Härtl
parent 1e3ff41cb2
commit 725f99d8b8
6 changed files with 95 additions and 10 deletions

View File

@@ -38,7 +38,7 @@ export class AttachmentApi {
}
async createAttachment({ cardId, formData }) {
const response = await axios({
const response = await axios({
method: 'POST',
url: this.url(`/cards/${cardId}/attachment`),
data: formData,
@@ -46,6 +46,15 @@ export class AttachmentApi {
return response.data
}
async updateAttachment({ cardId, attachmentId, formData }) {
const response = await axios({
method: 'PUT',
url: this.url(`/cards/${cardId}/attachment/${attachmentId}`),
data: formData,
})
return response.data
}
async deleteAttachment(attachment) {
await axios({
method: 'DELETE',