Skip to content

Commit 9bf3f03

Browse files
committed
[API] updates security.update_user_profile_data
1 parent 4fbcd34 commit 9bf3f03

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def update_user_profile_data(arguments = {})
4545

4646
_uid = arguments.delete(:uid)
4747

48-
method = Elasticsearch::API::HTTP_POST
49-
path = "_security/profile/_data/#{Utils.__listify(_uid)}"
48+
method = Elasticsearch::API::HTTP_PUT
49+
path = "_security/profile/#{Utils.__listify(_uid)}/_data"
5050
params = Utils.process_params(arguments)
5151

5252
Elasticsearch::API::Response.new(

elasticsearch-api/spec/unit_tests_platinum/unit/security/update_user_profile_data_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class SecurityUpdateUserProfileTest < Minitest::Test
2525

2626
should 'perform correct request' do
2727
subject.expects(:perform_request).with do |method, url, params, body|
28-
assert_equal('POST', method)
29-
assert_equal('_security/profile/_data/1', url)
28+
assert_equal('PUT', method)
29+
assert_equal('_security/profile/1/_data', url)
3030
assert_equal({}, params)
3131
assert_equal(body, {})
3232
true

0 commit comments

Comments
 (0)