1
0
Fork 0
forked from forgejo/forgejo

Add AddCollaborator API Endpoint (#2780)

* Add AddCollaborator API Endpoint

* Add optional Permission to AddCollaborator endpoint

* Use APIContext
This commit is contained in:
Robin Lambertz 2016-08-11 20:23:25 +02:00 committed by 无闻
parent 5077408d78
commit b6c14f8b21
2 changed files with 50 additions and 0 deletions

View file

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