From c62e26b6fe9d9f362fcfb1df2d5664d7f6854c31 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 19 Jun 2022 16:22:45 +0200 Subject: [PATCH] fix: revert renaming Attachments to Embeds everywhere --- pkg/modules/migration/trello/trello.go | 4 ++-- pkg/modules/migration/wunderlist/wunderlist.go | 2 +- pkg/routes/api/v1/task_attachment.go | 2 +- pkg/swagger/docs.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/modules/migration/trello/trello.go b/pkg/modules/migration/trello/trello.go index 81be1758..c443d3c6 100644 --- a/pkg/modules/migration/trello/trello.go +++ b/pkg/modules/migration/trello/trello.go @@ -242,12 +242,12 @@ func convertTrelloDataToVikunja(trelloData []*trello.Board, token string) (fullV log.Debugf("[Trello Migration] Converted label %s from card %s", label.ID, card.ID) } - // Embeds + // Attachments if len(card.Attachments) > 0 { log.Debugf("[Trello Migration] Downloading %d card attachments from card %s", len(card.Attachments), card.ID) } for _, attachment := range card.Attachments { - if attachment.MimeType == "" { // Embeds can also be not downloadable - the mime type is empty in that case. + if attachment.MimeType == "" { // Attachments can also be not downloadable - the mime type is empty in that case. log.Debugf("[Trello Migration] Attachment %s does not have a mime type, not downloading", attachment.ID) continue } diff --git a/pkg/modules/migration/wunderlist/wunderlist.go b/pkg/modules/migration/wunderlist/wunderlist.go index 7a1a9d16..fea6722e 100644 --- a/pkg/modules/migration/wunderlist/wunderlist.go +++ b/pkg/modules/migration/wunderlist/wunderlist.go @@ -181,7 +181,7 @@ func convertListForFolder(listID int, list *list, content *wunderlistContents) ( } } - // Embeds + // Attachments for _, f := range content.files { if f.TaskID == t.ID { // Download the attachment and put it in the file diff --git a/pkg/routes/api/v1/task_attachment.go b/pkg/routes/api/v1/task_attachment.go index 982be34c..d74357b4 100644 --- a/pkg/routes/api/v1/task_attachment.go +++ b/pkg/routes/api/v1/task_attachment.go @@ -36,7 +36,7 @@ import ( // @Param id path int true "Task ID" // @Param files formData string true "The file, as multipart form file. You can pass multiple." // @Security JWTKeyAuth -// @Success 200 {object} models.Message "Embeds were uploaded successfully." +// @Success 200 {object} models.Message "Attachments were uploaded successfully." // @Failure 403 {object} models.Message "No access to the task." // @Failure 404 {object} models.Message "The task does not exist." // @Failure 500 {object} models.Message "Internal error" diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index d8237b49..d7a0e6b3 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -4791,7 +4791,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "Embeds were uploaded successfully.", + "description": "Attachments were uploaded successfully.", "schema": { "$ref": "#/definitions/models.Message" }