aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/profile.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go
index a5f4a97efd..f72ced7b3c 100644
--- a/routers/user/profile.go
+++ b/routers/user/profile.go
@@ -95,6 +95,14 @@ func Profile(ctx *context.Context) {
if ctx.Written() {
return
}
+ case "stars":
+ showPrivateRepos := ctx.IsSigned && ctx.User.ID == ctxUser.ID
+ starredRepos, err := ctxUser.GetStarredRepos(showPrivateRepos)
+ if err != nil {
+ ctx.Handle(500, "GetStarredRepos", err)
+ return
+ }
+ ctx.Data["Repos"] = starredRepos
default:
page := ctx.QueryInt("page")
if page <= 0 {
@@ -138,11 +146,6 @@ func Following(ctx *context.Context) {
repo.RenderUserCards(ctx, u.NumFollowing, u.GetFollowing, tplFollowers)
}
-// Stars show repositories user starred
-func Stars(ctx *context.Context) {
-
-}
-
// Action response for follow/unfollow user request
func Action(ctx *context.Context) {
u := GetUserByParams(ctx)