summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/convert/convert.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-21 12:47:54 -0400
committerUnknwon <u@gogs.io>2016-03-21 12:47:54 -0400
commite6f927f61af927156798390e64f17dd6755697e7 (patch)
treec97f90dfb0f4ae96534c13f98352907fb42d177b /routers/api/v1/convert/convert.go
parent60ae8ac3d2995d46156ead8ad93004801daad4ce (diff)
downloadgitea-e6f927f61af927156798390e64f17dd6755697e7.tar.gz
gitea-e6f927f61af927156798390e64f17dd6755697e7.zip
#1692 api: admin list and create team under organization
Diffstat (limited to 'routers/api/v1/convert/convert.go')
-rw-r--r--routers/api/v1/convert/convert.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/routers/api/v1/convert/convert.go b/routers/api/v1/convert/convert.go
index 7e3e380bd8..8eca5f4ec6 100644
--- a/routers/api/v1/convert/convert.go
+++ b/routers/api/v1/convert/convert.go
@@ -196,3 +196,12 @@ func ToOrganization(org *models.User) *api.Organization {
Location: org.Location,
}
}
+
+func ToTeam(team *models.Team) *api.Team {
+ return &api.Team{
+ ID: team.ID,
+ Name: team.Name,
+ Description: team.Description,
+ Permission: team.Authorize.String(),
+ }
+}