diff options
author | 2023-08-10 15:08:41 +0100 | |
---|---|---|
committer | 2023-08-10 15:08:41 +0100 | |
commit | 91cbcd589e7c4ab87e5994e4d0276ea1248dc5c2 (patch) | |
tree | a6b12c30168eb5fed4267dcb6a1f385b86afdcdf /internal/api/auth/authorize.go | |
parent | [feature] List replies policy, refactor async workers (#2087) (diff) | |
download | gotosocial-91cbcd589e7c4ab87e5994e4d0276ea1248dc5c2.tar.xz |
[performance] remove last of relational queries to instead rely on caches (#2091)
Diffstat (limited to 'internal/api/auth/authorize.go')
-rw-r--r-- | internal/api/auth/authorize.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/api/auth/authorize.go b/internal/api/auth/authorize.go index f8978de92..4977ae4f2 100644 --- a/internal/api/auth/authorize.go +++ b/internal/api/auth/authorize.go @@ -75,8 +75,8 @@ func (m *Module) AuthorizeGETHandler(c *gin.Context) { return } - app := >smodel.Application{} - if err := m.db.GetWhere(c.Request.Context(), []db.Where{{Key: sessionClientID, Value: clientID}}, app); err != nil { + app, err := m.db.GetApplicationByClientID(c.Request.Context(), clientID) + if err != nil { m.clearSession(s) safe := fmt.Sprintf("application for %s %s could not be retrieved", sessionClientID, clientID) var errWithCode gtserror.WithCode |