Skip to content

Commit a16e96e

Browse files
committed
Remove trailing slash on bitbucket v2 endpoint
1 parent 15453ff commit a16e96e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/bitbucket_rest_api/repos/keys.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def create(user_name_or_project_key, repo_name, params={})
5959
# but has been tested
6060
"/1.0/projects/#{user_name_or_project_key}/repos/#{repo_name.downcase}/ssh"
6161
else
62-
"/2.0/repositories/#{user_name_or_project_key}/#{repo.downcase}/deploy-keys/"
62+
"/2.0/repositories/#{user_name_or_project_key}/#{repo.downcase}/deploy-keys"
6363
end
6464

6565
post_request(url, params, options)

spec/bitbucket_rest_api/repos/keys_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
before do
3030
expect(deploy_keys).to receive(:request).with(
3131
:post,
32-
'/2.0/repositories/mock_username/mock_repo/deploy-keys/',
32+
'/2.0/repositories/mock_username/mock_repo/deploy-keys',
3333
{ 'key' => 'mock_ssh_key', 'label' => 'mock_label' },
3434
{ headers: { "Content-Type" => "application/json" } }
3535
)

0 commit comments

Comments
 (0)