Fix #348
This commit is contained in:
parent
033a7f0224
commit
ab7206d6b7
13 changed files with 121 additions and 59 deletions
|
@ -972,8 +972,8 @@ func GetRepositories(uid int64, private bool) ([]*Repository, error) {
|
|||
}
|
||||
|
||||
// GetRecentUpdatedRepositories returns the list of repositories that are recently updated.
|
||||
func GetRecentUpdatedRepositories() (repos []*Repository, err error) {
|
||||
err = x.Where("is_private=?", false).Limit(5).Desc("updated").Find(&repos)
|
||||
func GetRecentUpdatedRepositories(num int) (repos []*Repository, err error) {
|
||||
err = x.Where("is_private=?", false).Limit(num).Desc("updated").Find(&repos)
|
||||
return repos, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue