forked from forgejo/forgejo
API Endpoints for collaborators (#375)
This commit is contained in:
parent
2e7ccecfe6
commit
2342df183b
3 changed files with 108 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue