diff options
author | 2021-12-20 15:19:53 +0100 | |
---|---|---|
committer | 2021-12-20 15:19:53 +0100 | |
commit | cb8688f4298a1a3ed5e28565004588be3c071df0 (patch) | |
tree | 038b196e914b949857bf8b7c00f22374408bc1ca /internal/federation/federatingdb/get.go | |
parent | return first offer when no accept header set (#351) (diff) | |
download | gotosocial-cb8688f4298a1a3ed5e28565004588be3c071df0.tar.xz |
Remove unnecessary storage config variables (#344)
* rewire config to not use extraneous serve vars
* rename 'file' to 'local' for consistency
* use Type and Size again
Diffstat (limited to 'internal/federation/federatingdb/get.go')
-rw-r--r-- | internal/federation/federatingdb/get.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/federation/federatingdb/get.go b/internal/federation/federatingdb/get.go index a409b7b91..ac3920c78 100644 --- a/internal/federation/federatingdb/get.go +++ b/internal/federation/federatingdb/get.go @@ -25,7 +25,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/activity/streams/vocab" - "github.com/superseriousbusiness/gotosocial/internal/util" + "github.com/superseriousbusiness/gotosocial/internal/uris" ) // Get returns the database entry for the specified id. @@ -40,7 +40,7 @@ func (f *federatingDB) Get(ctx context.Context, id *url.URL) (value vocab.Type, ) l.Debug("entering Get") - if util.IsUserPath(id) { + if uris.IsUserPath(id) { acct, err := f.db.GetAccountByURI(ctx, id.String()) if err != nil { return nil, err @@ -48,7 +48,7 @@ func (f *federatingDB) Get(ctx context.Context, id *url.URL) (value vocab.Type, return f.typeConverter.AccountToAS(ctx, acct) } - if util.IsStatusesPath(id) { + if uris.IsStatusesPath(id) { status, err := f.db.GetStatusByURI(ctx, id.String()) if err != nil { return nil, err @@ -56,11 +56,11 @@ func (f *federatingDB) Get(ctx context.Context, id *url.URL) (value vocab.Type, return f.typeConverter.StatusToAS(ctx, status) } - if util.IsFollowersPath(id) { + if uris.IsFollowersPath(id) { return f.Followers(ctx, id) } - if util.IsFollowingPath(id) { + if uris.IsFollowingPath(id) { return f.Following(ctx, id) } |