aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2018-09-13 10:33:48 +0800
committerGitHub <noreply@github.com>2018-09-13 10:33:48 +0800
commitea20adaa84cbff762fcaa7f2d5fa6b7bf56706ec (patch)
treec2d09da1dcb0a00654963b30dbf5eeb152c83857 /routers/user
parent7dd93b2441fc4eac89ccf6b919bf46823334c8bf (diff)
downloadgitea-ea20adaa84cbff762fcaa7f2d5fa6b7bf56706ec.tar.gz
gitea-ea20adaa84cbff762fcaa7f2d5fa6b7bf56706ec.zip
feat(repo): support search repository by topic name (#4505)
* feat(repo): support search repository by topic name
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/profile.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go
index fb731e715c..827226d3e1 100644
--- a/routers/user/profile.go
+++ b/routers/user/profile.go
@@ -105,6 +105,8 @@ func Profile(ctx *context.Context) {
page = 1
}
+ topicOnly := ctx.QueryBool("topic")
+
var (
repos []*models.Repository
count int64
@@ -174,6 +176,7 @@ func Profile(ctx *context.Context) {
PageSize: setting.UI.User.RepoPagingNum,
Starred: true,
Collaborate: util.OptionalBoolFalse,
+ TopicOnly: topicOnly,
})
if err != nil {
ctx.ServerError("SearchRepositoryByName", err)
@@ -217,6 +220,7 @@ func Profile(ctx *context.Context) {
IsProfile: true,
PageSize: setting.UI.User.RepoPagingNum,
Collaborate: util.OptionalBoolFalse,
+ TopicOnly: topicOnly,
})
if err != nil {
ctx.ServerError("SearchRepositoryByName", err)