Skip to content

Commit

Permalink
Rename accessToken and improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Naduni Pamudika committed May 27, 2024
1 parent 63828b1 commit cf9db35
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions import-export-cli/cmd/deprecated/listApiProducts.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func executeApiProductsCmd(credential credentials.Credential) {
impl.PrintAPIProducts(apiProducts, listApiProductsCmdFormat)
} else {
utils.Logln(utils.LogPrefixError+"Getting List of API Products", err)
utils.HandleErrorAndExit("Error getting the list of API Products.", err)
}
}

Expand Down
1 change: 1 addition & 0 deletions import-export-cli/cmd/deprecated/listApis.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func executeApisCmd(credential credentials.Credential) {
impl.PrintAPIs(apis, listApisCmdFormat)
} else {
utils.Logln(utils.LogPrefixError+"Getting List of APIs", err)
utils.HandleErrorAndExit("Error getting the list of APIs.", err)
}
}

Expand Down
1 change: 1 addition & 0 deletions import-export-cli/cmd/deprecated/listApps.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func executeAppsCmd(credential credentials.Credential, appOwner string) {
impl.PrintApps(apps, listAppsCmdFormat)
} else {
utils.Logln(utils.LogPrefixError+"Getting List of Applications", err)
utils.HandleErrorAndExit("Error getting the list of Applications.", err)
}
}

Expand Down
1 change: 1 addition & 0 deletions import-export-cli/cmd/getAPIProductRevisions.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func executeGetAPIProductRevisionsCmd(credential credentials.Credential) {
impl.PrintRevisions(revisions, getAPIProductRevisionsCmdFormat)
} else {
utils.Logln(utils.LogPrefixError+"Getting List of Revisions", err)
utils.HandleErrorAndExit("Error getting the list of revisions.", err)
}
}

Expand Down
1 change: 1 addition & 0 deletions import-export-cli/cmd/getAPIRevisions.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func executeGetAPIRevisionsCmd(credential credentials.Credential) {
impl.PrintRevisions(revisions, getAPIRevisionsCmdFormat)
} else {
utils.Logln(utils.LogPrefixError+"Getting List of API Revisions", err)
utils.HandleErrorAndExit("Error getting the list of API revisions.", err)
}
}

Expand Down
1 change: 1 addition & 0 deletions import-export-cli/cmd/getApiProducts.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func executeGetApiProductsCmd(credential credentials.Credential) {
impl.PrintAPIProducts(apiProducts, getApiProductsCmdFormat)
} else {
utils.Logln(utils.LogPrefixError+"Getting List of API Products", err)
utils.HandleErrorAndExit("Error getting the list of API Products.", err)
}
}

Expand Down
1 change: 1 addition & 0 deletions import-export-cli/cmd/getApis.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func executeGetApisCmd(credential credentials.Credential) {
impl.PrintAPIs(apis, getApisCmdFormat)
} else {
utils.Logln(utils.LogPrefixError+"Getting List of APIs", err)
utils.HandleErrorAndExit("Error getting the list of APIs.", err)
}
}

Expand Down
1 change: 1 addition & 0 deletions import-export-cli/cmd/getApps.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func executeGetAppsCmd(credential credentials.Credential, appOwner string) {
impl.PrintApps(apps, getAppsCmdFormat)
} else {
utils.Logln(utils.LogPrefixError+"Getting List of Applications", err)
utils.HandleErrorAndExit("Error getting the list of Applications.", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion import-export-cli/credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type Credential struct {
// ClientSecret for cli
ClientSecret string `json:"clientSecret"`
// PersonalAccessToken of API Manager
PersonalAccessToken string `json:"personalAccessToken"`
PersonalAccessToken string `json:"accessToken"`
}

// Credentials of cli
Expand Down

0 comments on commit cf9db35

Please sign in to comment.