diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/settings/settings.go | 1 | ||||
-rw-r--r-- | routers/user/profile.go | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/routers/api/v1/settings/settings.go b/routers/api/v1/settings/settings.go index cfb059a3ac..e6417e4074 100644 --- a/routers/api/v1/settings/settings.go +++ b/routers/api/v1/settings/settings.go @@ -60,6 +60,7 @@ func GetGeneralRepoSettings(ctx *context.APIContext) { MirrorsDisabled: setting.Repository.DisableMirrors, HTTPGitDisabled: setting.Repository.DisableHTTPGit, MigrationsDisabled: setting.Repository.DisableMigrations, + StarsDisabled: setting.Repository.DisableStars, TimeTrackingDisabled: !setting.Service.EnableTimetracking, LFSDisabled: !setting.LFS.StartServer, }) 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{ |