[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

@@ -699,8 +699,8 @@ func (c *converter) StatusToAPIStatus(ctx context.Context, s *gtsmodel.Status, r
}
if appID := s.CreatedWithApplicationID; appID != "" {
app := &gtsmodel.Application{}
if err := c.db.GetByID(ctx, appID, app); err != nil {
app, err := c.db.GetApplicationByID(ctx, appID)
if err != nil {
return nil, fmt.Errorf("error getting application %s: %w", appID, err)
}