diff options
author | 2022-10-03 10:46:11 +0200 | |
---|---|---|
committer | 2022-10-03 10:46:11 +0200 | |
commit | 56f53a2a6f85876485e2ae67d48b78b448caed6e (patch) | |
tree | 9bd8d3fcaffd515d3dc90ff22c6cee17e8d0b073 /internal/processing/fromclientapi.go | |
parent | [feature] Enlarge active/hovered custom emojis in statuses (#877) (diff) | |
download | gotosocial-56f53a2a6f85876485e2ae67d48b78b448caed6e.tar.xz |
[performance] add user cache and database (#879)
* go fmt
* add + use user cache and database
* fix import
* update tests
* remove unused relation
Diffstat (limited to 'internal/processing/fromclientapi.go')
-rw-r--r-- | internal/processing/fromclientapi.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/processing/fromclientapi.go b/internal/processing/fromclientapi.go index d7c9c5d82..a688e3732 100644 --- a/internal/processing/fromclientapi.go +++ b/internal/processing/fromclientapi.go @@ -29,7 +29,6 @@ import ( "github.com/superseriousbusiness/activity/pub" "github.com/superseriousbusiness/activity/streams" "github.com/superseriousbusiness/gotosocial/internal/ap" - "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/superseriousbusiness/gotosocial/internal/messages" @@ -138,8 +137,8 @@ func (p *processor) processCreateAccountFromClientAPI(ctx context.Context, clien } // get the user this account belongs to - user := >smodel.User{} - if err := p.db.GetWhere(ctx, []db.Where{{Key: "account_id", Value: account.ID}}, user); err != nil { + user, err := p.db.GetUserByAccountID(ctx, account.ID) + if err != nil { return err } |