summaryrefslogtreecommitdiff
path: root/internal/api/fileserver
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-02-22 16:05:26 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-22 16:05:26 +0100
commitb6fbdc66c1ce1ec61ebfb6fcc0351ea627a1d288 (patch)
treec79d1107375597ab8a79045c80dd62dc95a204e7 /internal/api/fileserver
parent[bugfix] Remove initial storage cleanup (#1545) (diff)
downloadgotosocial-b6fbdc66c1ce1ec61ebfb6fcc0351ea627a1d288.tar.xz
[chore] Deinterface processor and subprocessors (#1501)
* [chore] Deinterface processor and subprocessors * expose subprocessors via function calls * missing license header
Diffstat (limited to 'internal/api/fileserver')
-rw-r--r--internal/api/fileserver/fileserver.go4
-rw-r--r--internal/api/fileserver/fileserver_test.go2
-rw-r--r--internal/api/fileserver/servefile.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/internal/api/fileserver/fileserver.go b/internal/api/fileserver/fileserver.go
index ba2552caa..aa4696f6f 100644
--- a/internal/api/fileserver/fileserver.go
+++ b/internal/api/fileserver/fileserver.go
@@ -39,10 +39,10 @@ const (
)
type Module struct {
- processor processing.Processor
+ processor *processing.Processor
}
-func New(processor processing.Processor) *Module {
+func New(processor *processing.Processor) *Module {
return &Module{
processor: processor,
}
diff --git a/internal/api/fileserver/fileserver_test.go b/internal/api/fileserver/fileserver_test.go
index 5b139454e..0a6879e70 100644
--- a/internal/api/fileserver/fileserver_test.go
+++ b/internal/api/fileserver/fileserver_test.go
@@ -45,7 +45,7 @@ type FileserverTestSuite struct {
storage *storage.Driver
federator federation.Federator
tc typeutils.TypeConverter
- processor processing.Processor
+ processor *processing.Processor
mediaManager media.Manager
oauthServer oauth.Server
emailSender email.Sender
diff --git a/internal/api/fileserver/servefile.go b/internal/api/fileserver/servefile.go
index a344e3e53..d963df749 100644
--- a/internal/api/fileserver/servefile.go
+++ b/internal/api/fileserver/servefile.go
@@ -80,7 +80,7 @@ func (m *Module) ServeFile(c *gin.Context) {
// Acquire context from gin request.
ctx := c.Request.Context()
- content, errWithCode := m.processor.FileGet(ctx, authed, &apimodel.GetContentRequestForm{
+ content, errWithCode := m.processor.Media().GetFile(ctx, authed.Account, &apimodel.GetContentRequestForm{
AccountID: accountID,
MediaType: mediaType,
MediaSize: mediaSize,