Reduced number of news posts on landing page
This commit is contained in:
parent
9537917a8e
commit
6bd3f682f4
|
@ -14,7 +14,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func Index(c *RequestContext) ResponseData {
|
func Index(c *RequestContext) ResponseData {
|
||||||
const maxPostsPerTab = 60
|
const maxPostsPerTab = 50
|
||||||
|
const maxNewsPosts = 10
|
||||||
|
|
||||||
c.Perf.StartBlock("SQL", "Fetch subforum tree")
|
c.Perf.StartBlock("SQL", "Fetch subforum tree")
|
||||||
subforumTree := models.GetFullSubforumTree(c, c.Conn)
|
subforumTree := models.GetFullSubforumTree(c, c.Conn)
|
||||||
|
@ -107,7 +108,7 @@ func Index(c *RequestContext) ResponseData {
|
||||||
newsThreads, err := hmndata.FetchThreads(c, c.Conn, c.CurrentUser, hmndata.ThreadsQuery{
|
newsThreads, err := hmndata.FetchThreads(c, c.Conn, c.CurrentUser, hmndata.ThreadsQuery{
|
||||||
ProjectIDs: []int{models.HMNProjectID},
|
ProjectIDs: []int{models.HMNProjectID},
|
||||||
ThreadTypes: []models.ThreadType{models.ThreadTypeProjectBlogPost},
|
ThreadTypes: []models.ThreadType{models.ThreadTypeProjectBlogPost},
|
||||||
Limit: maxPostsPerTab,
|
Limit: maxNewsPosts,
|
||||||
OrderByCreated: true,
|
OrderByCreated: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue