summaryrefslogtreecommitdiff
path: root/internal/typeutils/internaltofrontend.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-08-04 12:28:33 +0100
committerLibravatar GitHub <noreply@github.com>2023-08-04 12:28:33 +0100
commit9a291dea843448f78b4b98ea6813739aebe708c6 (patch)
treef1ce643a3c9fe1b13e4c107f15b1ac4b20fe5b86 /internal/typeutils/internaltofrontend.go
parent[feature] simpler cache size configuration (#2051) (diff)
downloadgotosocial-9a291dea843448f78b4b98ea6813739aebe708c6.tar.xz
[performance] add caching of status fave, boost of, in reply to ID lists (#2060)
Diffstat (limited to 'internal/typeutils/internaltofrontend.go')
-rw-r--r--internal/typeutils/internaltofrontend.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go
index 8ad1681d0..2dc0e4dd5 100644
--- a/internal/typeutils/internaltofrontend.go
+++ b/internal/typeutils/internaltofrontend.go
@@ -600,17 +600,17 @@ func (c *converter) StatusToAPIStatus(ctx context.Context, s *gtsmodel.Status, r
return nil, fmt.Errorf("error converting status author: %w", err)
}
- repliesCount, err := c.db.CountStatusReplies(ctx, s)
+ repliesCount, err := c.db.CountStatusReplies(ctx, s.ID)
if err != nil {
return nil, fmt.Errorf("error counting replies: %w", err)
}
- reblogsCount, err := c.db.CountStatusReblogs(ctx, s)
+ reblogsCount, err := c.db.CountStatusBoosts(ctx, s.ID)
if err != nil {
return nil, fmt.Errorf("error counting reblogs: %w", err)
}
- favesCount, err := c.db.CountStatusFaves(ctx, s)
+ favesCount, err := c.db.CountStatusFaves(ctx, s.ID)
if err != nil {
return nil, fmt.Errorf("error counting faves: %w", err)
}