From bd60d4e7dad1573ff3e0886aee5ad82af70c865d Mon Sep 17 00:00:00 2001 From: Nate Mara Date: Thu, 28 Jun 2018 08:32:41 -0400 Subject: [PATCH] Remove FullComponent struct in favor of existing ProjectComponent --- component.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/component.go b/component.go index 4dc3788..680e631 100644 --- a/component.go +++ b/component.go @@ -25,17 +25,8 @@ type CreateComponentOptions struct { ProjectID int `json:"projectId,omitempty" structs:"projectId,omitempty"` } -// FullComponent is a JIRA component with all details filled in -type FullComponent struct { - RealAssigneeType string `json:"realAssigneeType,omitempty" structs:"realAssigneeType,omitempty"` - RealAssignee *User `json:"realAssignee,omitempty" structs:"realAssignee,omitempty"` - IsAssigneeTypeValid bool `json:"isAssigneeTypeValid,omitempty" structs:"isAssigneeTypeValid,omitempty"` - - CreateComponentOptions -} - // Create creates a new JIRA component based on the given options. -func (s *ComponentService) Create(options *CreateComponentOptions) (*FullComponent, *Response, error) { +func (s *ComponentService) Create(options *CreateComponentOptions) (*ProjectComponent, *Response, error) { apiEndpoint := "rest/api/2/component" req, err := s.client.NewRequest("POST", apiEndpoint, options) if err != nil { @@ -47,7 +38,7 @@ func (s *ComponentService) Create(options *CreateComponentOptions) (*FullCompone return nil, resp, err } - component := new(FullComponent) + component := new(ProjectComponent) defer resp.Body.Close() data, err := ioutil.ReadAll(resp.Body) if err != nil {