From b1d41cfa603aee63711fbc23bb02fced5a4c54e3 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 25 Mar 2016 18:04:02 -0400 Subject: #1692 add admin APIs to add/remove a user from teams --- routers/api/v1/org/team.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'routers/api/v1/org/team.go') diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index fad0d2f7..70f8d842 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -9,15 +9,10 @@ import ( "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/routers/api/v1/convert" - "github.com/gogits/gogs/routers/api/v1/user" ) func ListTeams(ctx *context.APIContext) { - org := user.GetUserByParamsName(ctx, ":orgname") - if ctx.Written() { - return - } - + org := ctx.Org.Organization if err := org.GetTeams(); err != nil { ctx.Error(500, "GetTeams", err) return -- cgit v1.2.3