Remove redundant query on post pages
Previously, we'd call GetCollectionAttribute for the monetization attribute, when it's already in the collection data.
This commit is contained in:
parent
aa72bcba50
commit
efe669b874
2
posts.go
2
posts.go
|
@ -1547,7 +1547,7 @@ Are you sure it was ever here?`,
|
|||
tp.CanInvite = canUserInvite(app.cfg, tp.IsAdmin)
|
||||
tp.PinnedPosts, _ = app.db.GetPinnedPosts(coll, p.IsOwner)
|
||||
tp.IsPinned = len(*tp.PinnedPosts) > 0 && PostsContains(tp.PinnedPosts, p)
|
||||
tp.Monetization = app.db.GetCollectionAttribute(coll.ID, "monetization_pointer")
|
||||
tp.Monetization = coll.Monetization
|
||||
tp.Verification = coll.Verification
|
||||
|
||||
if !postFound {
|
||||
|
|
Loading…
Reference in New Issue