From 3bba9acbf01b0eec5a0560e4abcd234c1398ea77 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Fri, 3 Sep 2021 18:02:46 +0800 Subject: [PATCH] route --- routers/home.go | 4 ++++ routers/private/cmd.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/routers/home.go b/routers/home.go index 087e4f57c..ee04d8325 100755 --- a/routers/home.go +++ b/routers/home.go @@ -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) } diff --git a/routers/private/cmd.go b/routers/private/cmd.go index d3c9c8670..3c44ae697 100755 --- a/routers/private/cmd.go +++ b/routers/private/cmd.go @@ -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{