Browse Source

#3169

update
tags/v1.22.12.1^2
chenyifan01 2 years ago
parent
commit
6c7aa78671
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      services/repository/square.go

+ 3
- 4
services/repository/square.go View File

@@ -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
}


Loading…
Cancel
Save