#4202 修复bug

Merged
ychao_1983 merged 2 commits from fix-4201 into V20230531 11 months ago
  1. +5
    -1
      services/tech/tech.go

+ 5
- 1
services/tech/tech.go View File

@@ -120,12 +120,16 @@ func SearchRepoInfoWithInstitution(opt *models.SearchRepoOpt) ([]*models.RepoWit
return []*models.RepoWithInstitution{}, 0, nil
}
repoIds, institutionMap := getRepoIdAndInstitutionMap(infos)
topics := make([]string, 0)
if opt.Topic != "" {
topics = append(topics, opt.Topic)
}

result, err := repository.FindRepos(repository.FindReposOptions{
ListOptions: models.ListOptions{Page: opt.Page, PageSize: opt.PageSize},
Sort: opt.OrderBy,
Keyword: opt.Q,
Topics: []string{opt.Topic},
Topics: topics,
RepoIds: repoIds,
})



Loading…
Cancel
Save