Browse Source

提交代码

tags/v1.22.1.3^2
ychao_1983 4 years ago
parent
commit
9335c19b18
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      models/repo_tag.go
  2. +1
    -1
      routers/org/home.go

+ 3
- 3
models/repo_tag.go View File

@@ -41,7 +41,7 @@ type TagsDetail struct {
TagId int64
TagName string
TagLimit int
RepoList []Repository
RepoList []*Repository
}

func GetTagByID(id int64) (*OfficialTag, error) {
@@ -141,8 +141,8 @@ func GetAllOfficialTagRepos(orgID int64, isOwner bool) ([]TagsDetail, error) {
return result, nil
}

func GetOfficialTagDetail(orgID, tagId int64) ([]Repository, error) {
t := make([]Repository, 0)
func GetOfficialTagDetail(orgID, tagId int64) ([]*Repository, error) {
t := make([]*Repository, 0)
const SQLCmd = "select t2.* from official_tag_repos t1 inner join repository t2 on t1.repo_id = t2.id where t1.org_id = ? and t1.tag_id=? order by t2.updated_unix desc"

if err := x.SQL(SQLCmd, orgID, tagId).Find(&t); err != nil {


+ 1
- 1
routers/org/home.go View File

@@ -158,7 +158,7 @@ func Home(ctx *context.Context) {
if setting.Course.OrgName == org.Name {
for _, tag := range tags {
for _, repo := range tag.RepoList {
(&repo).GetCreator()
repo.GetCreator()
}
}



Loading…
Cancel
Save