Skip to content

Commit

Permalink
bugfix: make profile command to use the new proxy feature
Browse files Browse the repository at this point in the history
  • Loading branch information
telegrapher committed Apr 21, 2021
1 parent c7c9f02 commit 65addb4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ims/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,23 @@ func (i Config) validateGetProfileConfig() error {
return nil
}

/*
* GetProfile requests the user profile using an access token.
*/

// GetProfile requests the user profile using an access token.
func (i Config) GetProfile() (string, error) {

err := i.validateGetProfileConfig()
if err != nil {
return "", fmt.Errorf("invalid parameters for profile: %v", err)
}

httpClient, err := i.httpClient()
if err != nil {
return "", fmt.Errorf("error creating the HTTP Client: %v", err)
}

c, err := ims.NewClient(&ims.ClientConfig{
URL: i.URL,
Client: httpClient,
})
if err != nil {
return "", fmt.Errorf("error creating the client: %v", err)
Expand Down

0 comments on commit 65addb4

Please sign in to comment.