From 8af20cc4bbbd450862ff830137581113df7fbbb2 Mon Sep 17 00:00:00 2001 From: Kurt Kanaskie Date: Thu, 14 Dec 2023 14:39:31 -0500 Subject: [PATCH] Properly reset client response setting --- internal/client/appgroups/keys.go | 3 ++- internal/client/apps/keys.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/client/appgroups/keys.go b/internal/client/appgroups/keys.go index 228f04cd1..99a29f9b4 100644 --- a/internal/client/appgroups/keys.go +++ b/internal/client/appgroups/keys.go @@ -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) } diff --git a/internal/client/apps/keys.go b/internal/client/apps/keys.go index 4d1ee4341..b63e7a852 100644 --- a/internal/client/apps/keys.go +++ b/internal/client/apps/keys.go @@ -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) }