summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index b78c55269e..42b52db936 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -727,6 +727,12 @@ func Routes() *web.Route {
Put(reqAdmin(), bind(api.AddCollaboratorOption{}), repo.AddCollaborator).
Delete(reqAdmin(), repo.DeleteCollaborator)
}, reqToken())
+ m.Group("/teams", func() {
+ m.Get("", reqAnyRepoReader(), repo.ListTeams)
+ m.Combo("/{team}").Get(reqAnyRepoReader(), repo.IsTeam).
+ Put(reqAdmin(), repo.AddTeam).
+ Delete(reqAdmin(), repo.DeleteTeam)
+ }, reqToken())
m.Get("/raw/*", context.RepoRefForAPI, reqRepoReader(models.UnitTypeCode), repo.GetRawFile)
m.Get("/archive/*", reqRepoReader(models.UnitTypeCode), repo.GetArchive)
m.Combo("/forks").Get(repo.ListForks).