diff options
Diffstat (limited to 'internal/processing/media/getmedia.go')
| -rw-r--r-- | internal/processing/media/getmedia.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/internal/processing/media/getmedia.go b/internal/processing/media/getmedia.go index 5144bbd8e..22e05cab3 100644 --- a/internal/processing/media/getmedia.go +++ b/internal/processing/media/getmedia.go @@ -26,6 +26,7 @@ import ( "code.superseriousbusiness.org/gotosocial/internal/db" "code.superseriousbusiness.org/gotosocial/internal/gtserror" "code.superseriousbusiness.org/gotosocial/internal/gtsmodel" + "code.superseriousbusiness.org/gotosocial/internal/typeutils" ) func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, mediaAttachmentID string) (*apimodel.Attachment, gtserror.WithCode) { @@ -42,10 +43,6 @@ func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, mediaAtt return nil, gtserror.NewErrorNotFound(errors.New("attachment not owned by requesting account")) } - a, err := p.converter.AttachmentToAPIAttachment(ctx, attachment) - if err != nil { - return nil, gtserror.NewErrorNotFound(fmt.Errorf("error converting attachment: %s", err)) - } - + a := typeutils.AttachmentToAPIAttachment(attachment) return &a, nil } |
