1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-09 12:07:20 +00:00

API Endpoints for collaborators (#375)

This commit is contained in:
Ethan Koenig
2016-12-26 02:37:01 -05:00
committed by Lunny Xiao
parent 2e7ccecfe6
commit 2342df183b
3 changed files with 108 additions and 1 deletions

View File

@ -270,7 +270,12 @@ func RegisterRoutes(m *macaron.Macaron) {
Patch(bind(api.EditHookOption{}), repo.EditHook).
Delete(repo.DeleteHook)
})
m.Put("/collaborators/:collaborator", bind(api.AddCollaboratorOption{}), repo.AddCollaborator)
m.Group("/collaborators", func() {
m.Get("", repo.ListCollaborators)
m.Combo("/:collaborator").Get(repo.IsCollaborator).
Put(bind(api.AddCollaboratorOption{}), repo.AddCollaborator).
Delete(repo.DeleteCollaborator)
})
m.Get("/raw/*", context.RepoRef(), repo.GetRawFile)
m.Get("/archive/*", repo.GetArchive)
m.Group("/branches", func() {