1
0
Fork 0
forked from forgejo/forgejo

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() {