aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org/team.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-25 18:04:02 -0400
committerUnknwon <u@gogs.io>2016-03-25 18:04:02 -0400
commitb1d41cfa603aee63711fbc23bb02fced5a4c54e3 (patch)
treedc79e8f9c8dec5ab324b27d10108667e7b4d9090 /routers/api/v1/org/team.go
parent9dda9ef07c03000cb961a80e3c75459c58602009 (diff)
downloadgitea-b1d41cfa603aee63711fbc23bb02fced5a4c54e3.tar.gz
gitea-b1d41cfa603aee63711fbc23bb02fced5a4c54e3.zip
#1692 add admin APIs to add/remove a user from teams
Diffstat (limited to 'routers/api/v1/org/team.go')
-rw-r--r--routers/api/v1/org/team.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go
index fad0d2f703..70f8d84206 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