diff options
author | 2021-12-20 15:19:53 +0100 | |
---|---|---|
committer | 2021-12-20 15:19:53 +0100 | |
commit | cb8688f4298a1a3ed5e28565004588be3c071df0 (patch) | |
tree | 038b196e914b949857bf8b7c00f22374408bc1ca /internal/db/bundb/admin.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/db/bundb/admin.go')
-rw-r--r-- | internal/db/bundb/admin.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/internal/db/bundb/admin.go b/internal/db/bundb/admin.go index 4b05fdd56..59703ddcc 100644 --- a/internal/db/bundb/admin.go +++ b/internal/db/bundb/admin.go @@ -37,7 +37,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/id" - "github.com/superseriousbusiness/gotosocial/internal/util" + "github.com/superseriousbusiness/gotosocial/internal/uris" "golang.org/x/crypto/bcrypt" ) @@ -100,30 +100,30 @@ func (a *adminDB) NewSignup(ctx context.Context, username string, reason string, WhereGroup(" AND ", whereEmptyOrNull("domain")). Scan(ctx) if err != nil { - // we just don't have an account yet create one - newAccountURIs := util.GenerateURIsForAccount(username) - newAccountID, err := id.NewRandomULID() + // we just don't have an account yet so create one + accountURIs := uris.GenerateURIsForAccount(username) + accountID, err := id.NewRandomULID() if err != nil { return nil, err } acct = >smodel.Account{ - ID: newAccountID, + ID: accountID, Username: username, DisplayName: username, Reason: reason, Privacy: gtsmodel.VisibilityDefault, - URL: newAccountURIs.UserURL, + URL: accountURIs.UserURL, PrivateKey: key, PublicKey: &key.PublicKey, - PublicKeyURI: newAccountURIs.PublicKeyURI, + PublicKeyURI: accountURIs.PublicKeyURI, ActorType: ap.ActorPerson, - URI: newAccountURIs.UserURI, - InboxURI: newAccountURIs.InboxURI, - OutboxURI: newAccountURIs.OutboxURI, - FollowersURI: newAccountURIs.FollowersURI, - FollowingURI: newAccountURIs.FollowingURI, - FeaturedCollectionURI: newAccountURIs.CollectionURI, + URI: accountURIs.UserURI, + InboxURI: accountURIs.InboxURI, + OutboxURI: accountURIs.OutboxURI, + FollowersURI: accountURIs.FollowersURI, + FollowingURI: accountURIs.FollowingURI, + FeaturedCollectionURI: accountURIs.CollectionURI, } if _, err = a.conn. NewInsert(). @@ -204,7 +204,7 @@ func (a *adminDB) CreateInstanceAccount(ctx context.Context) db.Error { return err } - newAccountURIs := util.GenerateURIsForAccount(username) + newAccountURIs := uris.GenerateURIsForAccount(username) acct := >smodel.Account{ ID: aID, Username: username, |