2015-12-17 02:28:47 -05:00
|
|
|
// Copyright 2015 The Gogs Authors. All rights reserved.
|
|
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
package admin
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
api "github.com/gogits/go-gogs-client"
|
|
|
|
|
|
2017-04-04 19:29:59 -04:00
|
|
|
"github.com/gogits/gogs/pkg/context"
|
2017-06-11 00:34:14 -04:00
|
|
|
"github.com/gogits/gogs/routes/api/v1/user"
|
2017-11-14 05:27:30 +02:00
|
|
|
"github.com/gogits/gogs/routes/api/v1/org"
|
2015-12-17 02:28:47 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// https://github.com/gogits/go-gogs-client/wiki/Administration-Organizations#create-a-new-organization
|
2017-06-03 07:26:09 -04:00
|
|
|
func CreateOrg(c *context.APIContext, form api.CreateOrgOption) {
|
2017-11-14 05:27:30 +02:00
|
|
|
org.CreateOrgForUser(c, form, user.GetUserByParams(c))
|
2015-12-17 02:28:47 -05:00
|
|
|
}
|