summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorShashvat Kedia <sk261@snu.edu.in>2019-01-24 04:00:19 +0530
committertechknowlogick <matti@mdranta.net>2019-01-23 17:30:19 -0500
commit1b90692844c1b714d9c03cf7c96e7f62923236c0 (patch)
treecb9bb22743da0898bb39c718bb3537a9581e8ea5 /routers/api/v1/api.go
parentb9f87376a2de9dd56fb6c374fc786b6aebd1e911 (diff)
downloadgitea-1b90692844c1b714d9c03cf7c96e7f62923236c0.tar.gz
gitea-1b90692844c1b714d9c03cf7c96e7f62923236c0.zip
New API routes added (#5594)
* New API routes added * Comments added * Build fix * swagger_v1_json.tmpl without new line character * Typo fix * Code review changes * Code review changes * Add copyright * Add copyright * Add copyright * Update per @lafriks feedback * Update org.go * Update user.go * Update user.go * make fmt
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 82c4b78de8..2787d01a04 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -671,7 +671,9 @@ func RegisterRoutes(m *macaron.Macaron) {
})
m.Group("/admin", func() {
+ m.Get("/orgs", admin.GetAllOrgs)
m.Group("/users", func() {
+ m.Get("", admin.GetAllUsers)
m.Post("", bind(api.CreateUserOption{}), admin.CreateUser)
m.Group("/:username", func() {
m.Combo("").Patch(bind(api.EditUserOption{}), admin.EditUser).
@@ -680,6 +682,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("", bind(api.CreateKeyOption{}), admin.CreatePublicKey)
m.Delete("/:id", admin.DeleteUserPublicKey)
})
+ m.Get("/orgs", org.ListUserOrgs)
m.Post("/orgs", bind(api.CreateOrgOption{}), admin.CreateOrg)
m.Post("/repos", bind(api.CreateRepoOption{}), admin.CreateRepo)
})