From 91cbcd589e7c4ab87e5994e4d0276ea1248dc5c2 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:08:41 +0100 Subject: [performance] remove last of relational queries to instead rely on caches (#2091) --- internal/api/auth/callback.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/api/auth/callback.go') diff --git a/internal/api/auth/callback.go b/internal/api/auth/callback.go index 8871fd2dc..6a6eecd8c 100644 --- a/internal/api/auth/callback.go +++ b/internal/api/auth/callback.go @@ -107,8 +107,8 @@ func (m *Module) CallbackGETHandler(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(), sessionClientID) + if err != nil { m.clearSession(s) safe := fmt.Sprintf("application for %s %s could not be retrieved", sessionClientID, clientID) var errWithCode gtserror.WithCode -- cgit v1.2.3