Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
res type is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Apr 13, 2022
1 parent c9ecd0b commit 5b6a60f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions client/res/res.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ func Update(name string, resPath string, resourceType string) (err error) {

//List
func List(resourceType string) (respBody []byte, err error) {
if !validate(resourceType) {
return respBody, fmt.Errorf("invalid resource type")
if resourceType != "" {
if !validate(resourceType) {
return respBody, fmt.Errorf("invalid resource type")
}
}

u, _ := url.Parse(apiclient.BaseURL)
u.Path = path.Join(u.Path, apiclient.GetApigeeOrg(), "environments", apiclient.GetApigeeEnv(), "resourcefiles")

Expand Down

0 comments on commit 5b6a60f

Please sign in to comment.