Skip to content

Commit

Permalink
Properly reset client response setting
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtkanaskie committed Dec 14, 2023
1 parent 73f9d08 commit 8af20cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/client/appgroups/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func CreateKey(name string, appName string, consumerKey string, consumerSecret s

// since the API does not support adding products when creating a key, use a second API call to add products
if len(apiProducts) > 0 {
apiclient.ClientPrintHttpResponse.Set(true)
// restore client output setting
apiclient.ClientPrintHttpResponse.Set(apiclient.GetCmdPrintHttpResponseSetting())
respBody, err = UpdateKeyProducts(name, appName, consumerKey, apiProducts)
}

Expand Down
3 changes: 2 additions & 1 deletion internal/client/apps/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ func CreateKey(developerEmail string, appID string, consumerKey string, consumer

// since the API does not support adding products when creating a key, use a second API call to add products
if len(apiProducts) > 0 {
apiclient.ClientPrintHttpResponse.Set(true)
// restore client output setting
apiclient.ClientPrintHttpResponse.Set(apiclient.GetCmdPrintHttpResponseSetting())
respBody, err = UpdateKeyProducts(developerEmail, appID, consumerKey, apiProducts, scopes)
}

Expand Down

0 comments on commit 8af20cc

Please sign in to comment.