Browse Source

route

tags/v1.21.12.1
lewis 4 years ago
parent
commit
3bba9acbf0
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      routers/home.go
  2. +1
    -1
      routers/private/cmd.go

+ 4
- 0
routers/home.go View File

@@ -146,6 +146,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
orderBy = models.SearchOrderByRecentUpdated
}

//todo:support other topics
keyword := strings.Trim(ctx.Query("q"), " ")
topicOnly := ctx.QueryBool("topic")
ctx.Data["TopicOnly"] = topicOnly
@@ -179,6 +180,9 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
pager.AddParam(ctx, "topic", "TopicOnly")
ctx.Data["Page"] = pager

//todo: add recommend_orgs
ctx.Data["RecommendOrgs"] = ""

ctx.HTML(200, opts.TplName)
}



+ 1
- 1
routers/private/cmd.go View File

@@ -13,7 +13,7 @@ import (
)

func UpdateAllRepoCommitCnt(ctx *macaron.Context) {
repos,err := models.GetAllRepositories()
repos, err := models.GetAllRepositories()
if err != nil {
log.Error("GetAllRepositories failed:%v", err.Error(), ctx.Data["MsgID"])
ctx.JSON(http.StatusInternalServerError, map[string]string{


Loading…
Cancel
Save