diff options
author | 2022-10-03 10:46:11 +0200 | |
---|---|---|
committer | 2022-10-03 10:46:11 +0200 | |
commit | 56f53a2a6f85876485e2ae67d48b78b448caed6e (patch) | |
tree | 9bd8d3fcaffd515d3dc90ff22c6cee17e8d0b073 /internal/api/client/auth/callback.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/api/client/auth/callback.go')
-rw-r--r-- | internal/api/client/auth/callback.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/api/client/auth/callback.go b/internal/api/client/auth/callback.go index 96a73a52f..daee2ae31 100644 --- a/internal/api/client/auth/callback.go +++ b/internal/api/client/auth/callback.go @@ -134,8 +134,7 @@ func (m *Module) parseUserFromClaims(ctx context.Context, claims *oidc.Claims, i // see if we already have a user for this email address // if so, we don't need to continue + create one - user := >smodel.User{} - err := m.db.GetWhere(ctx, []db.Where{{Key: "email", Value: claims.Email}}, user) + user, err := m.db.GetUserByEmailAddress(ctx, claims.Email) if err == nil { return user, nil } |