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/api/v1/admin | |
parent | 46e96c008cf966428c9dad71c7871de88186e3fe (diff) | |
download | gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.tar.gz gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.zip |
Refactor User.Id to User.ID
Diffstat (limited to 'routers/api/v1/admin')
-rw-r--r-- | routers/api/v1/admin/org_team.go | 6 | ||||
-rw-r--r-- | routers/api/v1/admin/user.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/routers/api/v1/admin/org_team.go b/routers/api/v1/admin/org_team.go index 9b5411b12e..c0f3487e11 100644 --- a/routers/api/v1/admin/org_team.go +++ b/routers/api/v1/admin/org_team.go @@ -15,7 +15,7 @@ import ( func CreateTeam(ctx *context.APIContext, form api.CreateTeamOption) { team := &models.Team{ - OrgID: ctx.Org.Organization.Id, + OrgID: ctx.Org.Organization.ID, Name: form.Name, Description: form.Description, Authorize: models.ParseAccessMode(form.Permission), @@ -37,7 +37,7 @@ func AddTeamMember(ctx *context.APIContext) { if ctx.Written() { return } - if err := ctx.Org.Team.AddMember(u.Id); err != nil { + if err := ctx.Org.Team.AddMember(u.ID); err != nil { ctx.Error(500, "AddMember", err) return } @@ -51,7 +51,7 @@ func RemoveTeamMember(ctx *context.APIContext) { return } - if err := ctx.Org.Team.RemoveMember(u.Id); err != nil { + if err := ctx.Org.Team.RemoveMember(u.ID); err != nil { ctx.Error(500, "RemoveMember", err) return } diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index 4bb24998bb..b282ce3227 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -147,5 +147,5 @@ func CreatePublicKey(ctx *context.APIContext, form api.CreateKeyOption) { if ctx.Written() { return } - user.CreateUserPublicKey(ctx, form, u.Id) + user.CreateUserPublicKey(ctx, form, u.ID) } |