Skip to content

Commit

Permalink
JSONize empty payload in add_group
Browse files Browse the repository at this point in the history
Using a raw hash instead of JSON payload was causing a header override warning in rest-client.

See rest-client/rest-client#104 for details; because an empty hash is passed directly as the payload, rest-client complains about incompatible headers. Solution is to simply json encode the empty hash.
  • Loading branch information
tlloydthwaites committed Oct 12, 2022
1 parent 0e69506 commit 9d89b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/keycloak-admin/client/user_client.rb
Expand Up @@ -36,7 +36,7 @@ def add_group(user_id, group_id)
@configuration.rest_client_options.merge(
method: :put,
url: "#{users_url(user_id)}/groups/#{group_id}",
payload: {},
payload: create_payload({}),
headers: headers
)
)
Expand Down

0 comments on commit 9d89b1b

Please sign in to comment.