diff --git a/chronograf.go b/chronograf.go index f68cbcc55e..842a33cd0f 100644 --- a/chronograf.go +++ b/chronograf.go @@ -788,7 +788,7 @@ type Organization struct { DefaultRole string `json:"defaultRole,omitempty"` // Public specifies whether users must be explicitly added to the organization. // It is currently only used by the default organization, but that may change in the future. - Public bool `json:"public,omitempty"` + Public bool `json:"public"` } // OrganizationQuery represents the attributes that a organization may be retrieved by. diff --git a/server/organizations.go b/server/organizations.go index 234150420a..b235ab5475 100644 --- a/server/organizations.go +++ b/server/organizations.go @@ -57,19 +57,13 @@ func (r *organizationRequest) ValidDefaultRole() error { } type organizationResponse struct { - Links selfLinks `json:"links"` - ID uint64 `json:"id,string"` - Name string `json:"name"` - DefaultRole string `json:"defaultRole,omitempty"` - Public bool `json:"public"` + Links selfLinks `json:"links"` + chronograf.Organization } func newOrganizationResponse(o *chronograf.Organization) *organizationResponse { return &organizationResponse{ - ID: o.ID, - Name: o.Name, - DefaultRole: o.DefaultRole, - Public: o.Public, + Organization: *o, Links: selfLinks{ Self: fmt.Sprintf("/chronograf/v1/organizations/%d", o.ID), },