fix: revert renaming Attachments to Embeds everywhere

This commit is contained in:
kolaente 2022-06-19 16:22:45 +02:00 committed by Gitea
parent f4f8450d16
commit c62e26b6fe
4 changed files with 5 additions and 5 deletions

View File

@ -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) log.Debugf("[Trello Migration] Converted label %s from card %s", label.ID, card.ID)
} }
// Embeds // Attachments
if len(card.Attachments) > 0 { if len(card.Attachments) > 0 {
log.Debugf("[Trello Migration] Downloading %d card attachments from card %s", len(card.Attachments), card.ID) log.Debugf("[Trello Migration] Downloading %d card attachments from card %s", len(card.Attachments), card.ID)
} }
for _, attachment := range card.Attachments { 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) log.Debugf("[Trello Migration] Attachment %s does not have a mime type, not downloading", attachment.ID)
continue continue
} }

View File

@ -181,7 +181,7 @@ func convertListForFolder(listID int, list *list, content *wunderlistContents) (
} }
} }
// Embeds // Attachments
for _, f := range content.files { for _, f := range content.files {
if f.TaskID == t.ID { if f.TaskID == t.ID {
// Download the attachment and put it in the file // Download the attachment and put it in the file

View File

@ -36,7 +36,7 @@ import (
// @Param id path int true "Task ID" // @Param id path int true "Task ID"
// @Param files formData string true "The file, as multipart form file. You can pass multiple." // @Param files formData string true "The file, as multipart form file. You can pass multiple."
// @Security JWTKeyAuth // @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 403 {object} models.Message "No access to the task."
// @Failure 404 {object} models.Message "The task does not exist." // @Failure 404 {object} models.Message "The task does not exist."
// @Failure 500 {object} models.Message "Internal error" // @Failure 500 {object} models.Message "Internal error"

View File

@ -4791,7 +4791,7 @@ const docTemplate = `{
], ],
"responses": { "responses": {
"200": { "200": {
"description": "Embeds were uploaded successfully.", "description": "Attachments were uploaded successfully.",
"schema": { "schema": {
"$ref": "#/definitions/models.Message" "$ref": "#/definitions/models.Message"
} }