mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 11:24:13 +00:00
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
1 changed files with 1 additions and 1 deletions
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 a new issue