From b6fbdc66c1ce1ec61ebfb6fcc0351ea627a1d288 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 22 Feb 2023 16:05:26 +0100 Subject: [chore] Deinterface processor and subprocessors (#1501) * [chore] Deinterface processor and subprocessors * expose subprocessors via function calls * missing license header --- internal/processing/media/create.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/processing/media/create.go') diff --git a/internal/processing/media/create.go b/internal/processing/media/create.go index 494434acb..dc26989f8 100644 --- a/internal/processing/media/create.go +++ b/internal/processing/media/create.go @@ -29,7 +29,8 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/media" ) -func (p *processor) Create(ctx context.Context, account *gtsmodel.Account, form *apimodel.AttachmentRequest) (*apimodel.Attachment, gtserror.WithCode) { +// Create creates a new media attachment belonging to the given account, using the request form. +func (p *Processor) Create(ctx context.Context, account *gtsmodel.Account, form *apimodel.AttachmentRequest) (*apimodel.Attachment, gtserror.WithCode) { data := func(innerCtx context.Context) (io.ReadCloser, int64, error) { f, err := form.File.Open() return f, form.File.Size, err -- cgit v1.2.3