mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
feat: Move create organizations route (#1831)
* feat: last rbac routes - move create organization to /organizations.
This commit is contained in:
@ -408,8 +408,8 @@ func (c *Client) OrganizationByName(ctx context.Context, user string, name strin
|
||||
}
|
||||
|
||||
// CreateOrganization creates an organization and adds the provided user as an admin.
|
||||
func (c *Client) CreateOrganization(ctx context.Context, user string, req CreateOrganizationRequest) (Organization, error) {
|
||||
res, err := c.Request(ctx, http.MethodPost, fmt.Sprintf("/api/v2/users/%s/organizations", user), req)
|
||||
func (c *Client) CreateOrganization(ctx context.Context, req CreateOrganizationRequest) (Organization, error) {
|
||||
res, err := c.Request(ctx, http.MethodPost, "/api/v2/organizations", req)
|
||||
if err != nil {
|
||||
return Organization{}, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user