Skip to content

Commit 70f6ad9

Browse files
authored
fix(client): correct serverinfo endpoint (#382)
1 parent de1cf0b commit 70f6ad9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,13 @@ func SetCertCacheInvalidationTime(duration time.Duration) func(g *GoCloak) {
288288
}
289289

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

295295
resp, err := g.GetRequestWithBearerAuth(ctx, accessToken).
296296
SetResult(&result).
297-
Get(makeURL(g.basePath, "admin", "realms"))
297+
Get(makeURL(g.basePath, "admin", "serverinfo"))
298298

299299
if err := checkForError(resp, err, errMessage); err != nil {
300300
return nil, err

0 commit comments

Comments
 (0)