Delete organization endpoint added (#5601)

* Delete organization endpoint added

* Parameters added in comment

* Typo fix

* Newline character removed
This commit is contained in:
Shashvat Kedia 2018-12-27 21:06:58 +05:30 committed by Jonas Franz
parent 21357a4ae0
commit 6e20b504b1
3 changed files with 49 additions and 1 deletions

View file

@ -622,7 +622,8 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/orgs/:orgname", func() {
m.Get("/repos", user.ListOrgRepos)
m.Combo("").Get(org.Get).
Patch(reqToken(), reqOrgOwnership(), bind(api.EditOrgOption{}), org.Edit)
Patch(reqToken(), reqOrgOwnership(), bind(api.EditOrgOption{}), org.Edit).
Delete(reqToken(), reqOrgOwnership(), org.Delete)
m.Group("/members", func() {
m.Get("", org.ListMembers)
m.Combo("/:username").Get(org.IsMember).