Limit number of timeline items with SQL
This commit is contained in:
parent
3a492059de
commit
df0e57f4cc
|
@ -308,13 +308,12 @@ func ProjectHomepage(c *RequestContext) ResponseData {
|
|||
|
||||
templateData.RecentActivity, err = FetchTimeline(c, c.Conn, c.CurrentUser, lineageBuilder, hmndata.TimelineQuery{
|
||||
ProjectIDs: []int{c.CurrentProject.ID},
|
||||
Limit: maxRecentActivity,
|
||||
})
|
||||
if err != nil {
|
||||
return c.ErrorResponse(http.StatusInternalServerError, err)
|
||||
}
|
||||
|
||||
templateData.RecentActivity = utils.ClampSlice(templateData.RecentActivity, maxRecentActivity)
|
||||
|
||||
followUrl := ""
|
||||
following := false
|
||||
if c.CurrentUser != nil {
|
||||
|
|
Reference in New Issue