Skip to content

Commit

Permalink
Update linkages on some endpoints to only accept a single link
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsky committed Aug 6, 2020
1 parent a8a8c41 commit 9deb6cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions asc/apps_metadata_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,10 @@ func (s *AppsService) GetBuildIDForAppStoreVersion(id string) (*AppStoreVersionB
// UpdateBuildForAppStoreVersion changes the build that is attached to a specific App Store version.
//
// https://developer.apple.com/documentation/appstoreconnectapi/modify_the_build_for_an_app_store_version
func (s *AppsService) UpdateBuildForAppStoreVersion(id string, linkages *[]RelationshipsData) (*AppStoreVersionBuildLinkageResponse, *Response, error) {
func (s *AppsService) UpdateBuildForAppStoreVersion(id string, linkage *RelationshipsData) (*AppStoreVersionBuildLinkageResponse, *Response, error) {
url := fmt.Sprintf("appStoreVersions/%s/relationships/build", id)
res := new(AppStoreVersionBuildLinkageResponse)
resp, err := s.client.patch(url, linkages, res)
resp, err := s.client.patch(url, linkage, res)
return res, resp, err
}

Expand Down
4 changes: 2 additions & 2 deletions asc/builds.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ func (s *BuildsService) UpdateBuild(id string, body BuildUpdateRequest) (*BuildR
// UpdateAppEncryptionDeclarationForBuild assigns an app encryption declaration to a build.
//
// https://developer.apple.com/documentation/appstoreconnectapi/assign_the_app_encryption_declaration_for_a_build
func (s *BuildsService) UpdateAppEncryptionDeclarationForBuild(id string, linkages *[]RelationshipsData) (*Response, error) {
func (s *BuildsService) UpdateAppEncryptionDeclarationForBuild(id string, linkage *RelationshipsData) (*Response, error) {
url := fmt.Sprintf("builds/%s/relationships/appEncryptionDeclaration", id)
return s.client.patch(url, linkages, nil)
return s.client.patch(url, linkage, nil)
}

// CreateAccessForBetaGroupsToBuild adds or creates a beta group to a build to enable testing.
Expand Down

0 comments on commit 9deb6cc

Please sign in to comment.