summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/admin/org_team.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/admin/org_team.go')
-rw-r--r--routers/api/v1/admin/org_team.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/api/v1/admin/org_team.go b/routers/api/v1/admin/org_team.go
index b1964ff728..93af1ec427 100644
--- a/routers/api/v1/admin/org_team.go
+++ b/routers/api/v1/admin/org_team.go
@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/routers/api/v1/user"
)
+// CreateTeam api for create a team
func CreateTeam(ctx *context.APIContext, form api.CreateTeamOption) {
team := &models.Team{
OrgID: ctx.Org.Organization.ID,
@@ -32,6 +33,7 @@ func CreateTeam(ctx *context.APIContext, form api.CreateTeamOption) {
ctx.JSON(201, convert.ToTeam(team))
}
+// AddTeamMember api for add a member to a team
func AddTeamMember(ctx *context.APIContext) {
u := user.GetUserByParams(ctx)
if ctx.Written() {
@@ -45,6 +47,7 @@ func AddTeamMember(ctx *context.APIContext) {
ctx.Status(204)
}
+// RemoveTeamMember api for remove one member from a team
func RemoveTeamMember(ctx *context.APIContext) {
u := user.GetUserByParams(ctx)
if ctx.Written() {