summaryrefslogtreecommitdiff
path: root/internal/typeutils/internaltofrontend.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-08-10 15:08:41 +0100
committerLibravatar GitHub <noreply@github.com>2023-08-10 15:08:41 +0100
commit91cbcd589e7c4ab87e5994e4d0276ea1248dc5c2 (patch)
treea6b12c30168eb5fed4267dcb6a1f385b86afdcdf /internal/typeutils/internaltofrontend.go
parent[feature] List replies policy, refactor async workers (#2087) (diff)
downloadgotosocial-91cbcd589e7c4ab87e5994e4d0276ea1248dc5c2.tar.xz
[performance] remove last of relational queries to instead rely on caches (#2091)
Diffstat (limited to 'internal/typeutils/internaltofrontend.go')
-rw-r--r--internal/typeutils/internaltofrontend.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go
index 2dc0e4dd5..ab04f6ccc 100644
--- a/internal/typeutils/internaltofrontend.go
+++ b/internal/typeutils/internaltofrontend.go
@@ -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)
}