Skip to content

Commit

Permalink
fix(client): correct serverinfo endpoint (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianccm authored May 3, 2023
1 parent de1cf0b commit 70f6ad9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ func SetCertCacheInvalidationTime(duration time.Duration) func(g *GoCloak) {
}

// GetServerInfo fetches the server info.
func (g *GoCloak) GetServerInfo(ctx context.Context, accessToken string) ([]*ServerInfoRepresentation, error) {
func (g *GoCloak) GetServerInfo(ctx context.Context, accessToken string) (*ServerInfoRepresentation, error) {
errMessage := "could not get server info"
var result []*ServerInfoRepresentation
var result *ServerInfoRepresentation

resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
SetResult(&result).
Get(makeURL(g.basePath, "admin", "realms"))
Get(makeURL(g.basePath, "admin", "serverinfo"))

if err := checkForError(resp, err, errMessage); err != nil {
return nil, err
Expand Down

0 comments on commit 70f6ad9

Please sign in to comment.