Skip to content

Commit

Permalink
fix: organization id
Browse files Browse the repository at this point in the history
  • Loading branch information
Herdanis committed Dec 12, 2024
1 parent 24e4b4a commit 20edccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4522,14 +4522,14 @@ func (g *GoCloak) CreateOrganization(ctx context.Context, token, realm string, o
return getID(resp), nil
}

func (g *GoCloak) GetOrganization(ctx context.Context, token, realm string, organization Organization) (*Organization, error) {
func (g *GoCloak) GetOrganization(ctx context.Context, token, realm, idOfOrganization string) (*Organization, error) {
const errMessage = "could not get organization"

var result Organization

resp, err := g.GetRequestWithBearerAuth(ctx, token).
SetResult(&result).
Get(g.getAdminRealmURL(realm, "organizations"))
Get(g.getAdminRealmURL(realm, "organizations", idOfOrganization))
if err := checkForError(resp, err, errMessage); err != nil {
return nil, err
}
Expand Down

0 comments on commit 20edccd

Please sign in to comment.