diff options
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{ |