org.go 585 B

123456789101112131415161718
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package admin
  5. import (
  6. api "github.com/gogits/go-gogs-client"
  7. "github.com/gogits/gogs/pkg/context"
  8. "github.com/gogits/gogs/routes/api/v1/user"
  9. "github.com/gogits/gogs/routes/api/v1/org"
  10. )
  11. // https://github.com/gogits/go-gogs-client/wiki/Administration-Organizations#create-a-new-organization
  12. func CreateOrg(c *context.APIContext, form api.CreateOrgOption) {
  13. org.CreateOrgForUser(c, form, user.GetUserByParams(c))
  14. }