Add trello migration (#734)
Fix tests for background images Generate docs Fix lint Do the swag Add more logging Remove the default bucket if it was empty Add launch.json Make importing backgrounds work Add comment Fix getting task attachments Fix getting trello token Add trello migration routes and status Add support for converting checklists Add test for attachments Add the actual conversion Add Trello conversion test Add migration function stubs Add basic trello migration structure Add trello migration config Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/734 Co-Authored-By: konrad <konrad@kola-entertainments.de> Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
@ -382,18 +382,7 @@ func convertTodoistToVikunja(sync *sync) (fullVikunjaHierachie []*models.Namespa
|
||||
// Only add the attachment if there's something to download
|
||||
if len(n.FileAttachment.FileURL) > 0 {
|
||||
// Download the attachment and put it in the file
|
||||
req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, n.FileAttachment.FileURL, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hc := http.Client{}
|
||||
resp, err := hc.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
buf := &bytes.Buffer{}
|
||||
_, err = buf.ReadFrom(resp.Body)
|
||||
buf, err := migration.DownloadFile(n.FileAttachment.FileURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user