|
|
@ -123,13 +123,10 @@ func EditTeam(ctx *context.APIContext, form api.EditTeamOption) { |
|
|
|
// responses:
|
|
|
|
// responses:
|
|
|
|
// "200":
|
|
|
|
// "200":
|
|
|
|
// "$ref": "#/responses/Team"
|
|
|
|
// "$ref": "#/responses/Team"
|
|
|
|
team := &models.Team{ |
|
|
|
team := ctx.Org.Team |
|
|
|
ID: ctx.Org.Team.ID, |
|
|
|
team.Name = form.Name |
|
|
|
OrgID: ctx.Org.Team.OrgID, |
|
|
|
team.Description = form.Description |
|
|
|
Name: form.Name, |
|
|
|
team.Authorize = models.ParseAccessMode(form.Permission) |
|
|
|
Description: form.Description, |
|
|
|
|
|
|
|
Authorize: models.ParseAccessMode(form.Permission), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if err := models.UpdateTeam(team, true); err != nil { |
|
|
|
if err := models.UpdateTeam(team, true); err != nil { |
|
|
|
ctx.Error(500, "EditTeam", err) |
|
|
|
ctx.Error(500, "EditTeam", err) |
|
|
|
return |
|
|
|
return |
|
|
|