diff options
author | 2022-02-12 18:27:58 +0000 | |
---|---|---|
committer | 2022-02-12 18:27:58 +0000 | |
commit | 31935ee206107f077878d3cdb6a26b82436b6893 (patch) | |
tree | 2d522bf98013dc5a4539133561b645fd7457eb06 /testrig/mediahandler.go | |
parent | [chore] Add nightly mirror to Codeberg.org (#392) (diff) | |
parent | Go mod tidy (diff) | |
download | gotosocial-31935ee206107f077878d3cdb6a26b82436b6893.tar.xz |
Merge pull request #361 from superseriousbusiness/media_refactorv0.2.0
Refactor media handler to allow async media resolution
Diffstat (limited to 'testrig/mediahandler.go')
-rw-r--r-- | testrig/mediahandler.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/testrig/mediahandler.go b/testrig/mediahandler.go index ab7fee621..38190eca3 100644 --- a/testrig/mediahandler.go +++ b/testrig/mediahandler.go @@ -24,7 +24,11 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/media" ) -// NewTestMediaHandler returns a media handler with the default test config, and the given db and storage. -func NewTestMediaHandler(db db.DB, storage *kv.KVStore) media.Handler { - return media.New(db, storage) +// NewTestMediaManager returns a media handler with the default test config, and the given db and storage. +func NewTestMediaManager(db db.DB, storage *kv.KVStore) media.Manager { + m, err := media.NewManager(db, storage) + if err != nil { + panic(err) + } + return m } |