mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 09:17:30 -06:00
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
This commit is contained in:
parent
2582515b4d
commit
cb8688f429
51 changed files with 310 additions and 408 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue