[performance] remove last of relational queries to instead rely on caches (#2091)

This commit is contained in:
kim
2023-08-10 15:08:41 +01:00
committed by GitHub
parent 9770d54237
commit 91cbcd589e
19 changed files with 507 additions and 107 deletions

View File

@@ -107,8 +107,8 @@ func (m *Module) CallbackGETHandler(c *gin.Context) {
return
}
app := &gtsmodel.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