From 42be0d2726568fed8369b468a4bb3fe6a4bed023 Mon Sep 17 00:00:00 2001 From: Benji Vesterby Date: Sat, 26 Feb 2022 04:44:59 -0500 Subject: [PATCH] Fixing broken tests from bad merge --- .gitignore | 1 + servicedesk.go | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1e57f8a7..e2006062 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ _testmain.go *.prof *.iml .idea +.DS_Store \ No newline at end of file diff --git a/servicedesk.go b/servicedesk.go index 80e30327..7fbffc0b 100644 --- a/servicedesk.go +++ b/servicedesk.go @@ -59,8 +59,8 @@ func (s *ServiceDeskService) GetOrganizations(serviceDeskID interface{}, start i // // https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization/#api-rest-servicedeskapi-servicedesk-servicedeskid-organization-post // Caller must close resp.Body -func (s *ServiceDeskService) AddOrganizationWithContext(ctx context.Context, serviceDeskID int, organizationID int) (*Response, error) { - apiEndPoint := fmt.Sprintf("rest/servicedeskapi/servicedesk/%d/organization", serviceDeskID) +func (s *ServiceDeskService) AddOrganizationWithContext(ctx context.Context, serviceDeskID interface{}, organizationID int) (*Response, error) { + apiEndPoint := fmt.Sprintf("rest/servicedeskapi/servicedesk/%v/organization", serviceDeskID) organization := ServiceDeskOrganizationDTO{ OrganizationID: organizationID, @@ -83,7 +83,7 @@ func (s *ServiceDeskService) AddOrganizationWithContext(ctx context.Context, ser // AddOrganization wraps AddOrganizationWithContext using the background context. // Caller must close resp.Body -func (s *ServiceDeskService) AddOrganization(serviceDeskID int, organizationID int) (*Response, error) { +func (s *ServiceDeskService) AddOrganization(serviceDeskID interface{}, organizationID int) (*Response, error) { return s.AddOrganizationWithContext(context.Background(), serviceDeskID, organizationID) } @@ -94,8 +94,8 @@ func (s *ServiceDeskService) AddOrganization(serviceDeskID int, organizationID i // // https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization/#api-rest-servicedeskapi-servicedesk-servicedeskid-organization-delete // Caller must close resp.Body -func (s *ServiceDeskService) RemoveOrganizationWithContext(ctx context.Context, serviceDeskID int, organizationID int) (*Response, error) { - apiEndPoint := fmt.Sprintf("rest/servicedeskapi/servicedesk/%d/organization", serviceDeskID) +func (s *ServiceDeskService) RemoveOrganizationWithContext(ctx context.Context, serviceDeskID interface{}, organizationID int) (*Response, error) { + apiEndPoint := fmt.Sprintf("rest/servicedeskapi/servicedesk/%v/organization", serviceDeskID) organization := ServiceDeskOrganizationDTO{ OrganizationID: organizationID, @@ -118,7 +118,7 @@ func (s *ServiceDeskService) RemoveOrganizationWithContext(ctx context.Context, // RemoveOrganization wraps RemoveOrganizationWithContext using the background context. // Caller must close resp.Body -func (s *ServiceDeskService) RemoveOrganization(serviceDeskID int, organizationID int) (*Response, error) { +func (s *ServiceDeskService) RemoveOrganization(serviceDeskID interface{}, organizationID int) (*Response, error) { return s.RemoveOrganizationWithContext(context.Background(), serviceDeskID, organizationID) }