|
|
@@ -135,9 +135,8 @@ func FindRepos(opts FindReposOptions) (*models.FindReposResponse, error) { |
|
|
|
result := make([]*models.Repository4Card, len(repos)) |
|
|
|
for i, r := range repos { |
|
|
|
t := r.ToCardFormat() |
|
|
|
contributors, n := GetRepoTopNContributors(r, 6) |
|
|
|
contributors, _ := GetRepoTopNContributors(r, 6) |
|
|
|
t.Contributors = contributors |
|
|
|
t.TotalContributorCount = n |
|
|
|
result[i] = t |
|
|
|
} |
|
|
|
|
|
|
@@ -157,7 +156,7 @@ type ActiveUser struct { |
|
|
|
|
|
|
|
func GetActiveUser4Square(currentUserId int64) ([]*ActiveUser, error) { |
|
|
|
result := make([]*ActiveUser, 0) |
|
|
|
userIds, err := models.QueryLast30DaysHighestIndexUsers(10) |
|
|
|
userIds, err := models.QueryLast30DaysHighestIndexUsers(5) |
|
|
|
if err != nil { |
|
|
|
log.Error("ActiveUser err. %v", err) |
|
|
|
return result, err |
|
|
@@ -196,7 +195,7 @@ func GetActiveUser4Square(currentUserId int64) ([]*ActiveUser, error) { |
|
|
|
} |
|
|
|
|
|
|
|
func GetActiveOrgs() ([]*models.User4Front, error) { |
|
|
|
orgScores, err := models.FindTopNOpenIOrgs(10) |
|
|
|
orgScores, err := models.FindTopNOpenIOrgs(5) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|