diff options
author | Kyle D <kdumontnu@gmail.com> | 2021-04-15 10:53:57 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 18:53:57 +0200 |
commit | f44543a1bb776fa8bdfd3b605d67197d1466eb20 (patch) | |
tree | b9a014285b40c3eb45dd90bcafa7ccc17c1031d8 /routers/user/profile.go | |
parent | af2adb4e35ea71ca5c7fbb1e51b9d25fe49af2e4 (diff) | |
download | gitea-f44543a1bb776fa8bdfd3b605d67197d1466eb20.tar.gz gitea-f44543a1bb776fa8bdfd3b605d67197d1466eb20.zip |
Disable Stars config option (#14653)
* Add config option to disable stars
* Replace "stars" with watched in user profile
* Add documentation
Diffstat (limited to 'routers/user/profile.go')
-rw-r--r-- | routers/user/profile.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go index 40619aaf0f..c24614b108 100644 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -238,6 +238,27 @@ func Profile(ctx *context.Context) { ctx.ServerError("GetProjects", err) return } + case "watching": + repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ + ListOptions: models.ListOptions{ + PageSize: setting.UI.User.RepoPagingNum, + Page: page, + }, + Actor: ctx.User, + Keyword: keyword, + OrderBy: orderBy, + Private: ctx.IsSigned, + WatchedByID: ctxUser.ID, + Collaborate: util.OptionalBoolFalse, + TopicOnly: topicOnly, + IncludeDescription: setting.UI.SearchRepoDescription, + }) + if err != nil { + ctx.ServerError("SearchRepository", err) + return + } + + total = int(count) default: repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ ListOptions: models.ListOptions{ |