diff options
author | Unknwon <u@gogs.io> | 2016-07-24 01:08:22 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-24 01:08:22 +0800 |
commit | 1f2e173a745da8e4b57f96b5561a3c10054d3b76 (patch) | |
tree | 367f0f07e4fe1269ac0772e0561a4bf912b5153c /routers/user/profile.go | |
parent | 46e96c008cf966428c9dad71c7871de88186e3fe (diff) | |
download | gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.tar.gz gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.zip |
Refactor User.Id to User.ID
Diffstat (limited to 'routers/user/profile.go')
-rw-r--r-- | routers/user/profile.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go index 847cffdd4e..0e436eac41 100644 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -62,7 +62,7 @@ func Profile(ctx *context.Context) { // Show SSH keys. if isShowKeys { - ShowSSHKeys(ctx, u.Id) + ShowSSHKeys(ctx, u.ID) return } @@ -75,7 +75,7 @@ func Profile(ctx *context.Context) { ctx.Data["PageIsUserProfile"] = true ctx.Data["Owner"] = u - orgs, err := models.GetOrgsByUserID(u.Id, ctx.IsSigned && (ctx.User.IsAdmin || ctx.User.Id == u.Id)) + orgs, err := models.GetOrgsByUserID(u.ID, ctx.IsSigned && (ctx.User.IsAdmin || ctx.User.ID == u.ID)) if err != nil { ctx.Handle(500, "GetOrgsByUserIDDesc", err) return @@ -87,13 +87,13 @@ func Profile(ctx *context.Context) { ctx.Data["TabName"] = tab switch tab { case "activity": - retrieveFeeds(ctx, u.Id, -1, 0, true) + retrieveFeeds(ctx, u.ID, -1, 0, true) if ctx.Written() { return } default: var err error - ctx.Data["Repos"], err = models.GetRepositories(u.Id, ctx.IsSigned && ctx.User.Id == u.Id) + ctx.Data["Repos"], err = models.GetRepositories(u.ID, ctx.IsSigned && ctx.User.ID == u.ID) if err != nil { ctx.Handle(500, "GetRepositories", err) return @@ -140,9 +140,9 @@ func Action(ctx *context.Context) { var err error switch ctx.Params(":action") { case "follow": - err = models.FollowUser(ctx.User.Id, u.Id) + err = models.FollowUser(ctx.User.ID, u.ID) case "unfollow": - err = models.UnfollowUser(ctx.User.Id, u.Id) + err = models.UnfollowUser(ctx.User.ID, u.ID) } if err != nil { |