aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/admin/org.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/admin/org.go')
-rw-r--r--routers/api/v1/admin/org.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/routers/api/v1/admin/org.go b/routers/api/v1/admin/org.go
index 706e2cedeb..99c9cf0b95 100644
--- a/routers/api/v1/admin/org.go
+++ b/routers/api/v1/admin/org.go
@@ -14,8 +14,21 @@ import (
)
// CreateOrg api for create organization
-// see https://github.com/gogits/go-gogs-client/wiki/Administration-Organizations#create-a-new-organization
func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) {
+ // swagger:route POST /admin/users/{username}/orgs admin adminCreateOrg
+ //
+ // Consumes:
+ // - application/json
+ //
+ // Produces:
+ // - application/json
+ //
+ // Responses:
+ // 201: Organization
+ // 403: forbidden
+ // 422: validationError
+ // 500: error
+
u := user.GetUserByParams(ctx)
if ctx.Written() {
return