diff options
Diffstat (limited to 'routers/org/teams.go')
-rw-r--r-- | routers/org/teams.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/org/teams.go b/routers/org/teams.go index bc12a97160..d082576cc8 100644 --- a/routers/org/teams.go +++ b/routers/org/teams.go @@ -41,9 +41,9 @@ func TeamsAction(ctx *middleware.Context) { var err error switch ctx.Params(":action") { case "join": - err = models.AddTeamMember(ctx.Org.Organization.Id, ctx.Org.Team.Id, ctx.User.Id) + err = ctx.Org.Team.AddMember(ctx.User.Id) case "leave": - err = models.RemoveMember(ctx.Org.Organization.Id, ctx.Org.Team.Id, ctx.User.Id) + err = ctx.Org.Team.RemoveMember(ctx.User.Id) } if err != nil { |