summaryrefslogtreecommitdiff
path: root/lib/api/users.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-07 03:08:03 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-07 03:08:03 +0000
commit73f25276606bed7d822153814de9467900aac244 (patch)
tree4d98413398c19441369a15bbef67c261bcb53363 /lib/api/users.rb
parent3e31cffa203fd718381421e8035f7161a9f0338e (diff)
downloadgitlab-ce-73f25276606bed7d822153814de9467900aac244.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r--lib/api/users.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 5b51f114fb4..cc13c8aab9e 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -308,7 +308,7 @@ module API
desc 'Add a GPG key to a specified user. Available only for admins.' do
detail 'This feature was added in GitLab 10.0'
- success Entities::GPGKey
+ success Entities::GpgKey
end
params do
requires :id, type: Integer, desc: 'The ID of the user'
@@ -324,7 +324,7 @@ module API
key = user.gpg_keys.new(declared_params(include_missing: false))
if key.save
- present key, with: Entities::GPGKey
+ present key, with: Entities::GpgKey
else
render_validation_error!(key)
end
@@ -333,7 +333,7 @@ module API
desc 'Get the GPG keys of a specified user. Available only for admins.' do
detail 'This feature was added in GitLab 10.0'
- success Entities::GPGKey
+ success Entities::GpgKey
end
params do
requires :id, type: Integer, desc: 'The ID of the user'
@@ -346,7 +346,7 @@ module API
user = User.find_by(id: params[:id])
not_found!('User') unless user
- present paginate(user.gpg_keys), with: Entities::GPGKey
+ present paginate(user.gpg_keys), with: Entities::GpgKey
end
# rubocop: enable CodeReuse/ActiveRecord
@@ -746,18 +746,18 @@ module API
desc "Get the currently authenticated user's GPG keys" do
detail 'This feature was added in GitLab 10.0'
- success Entities::GPGKey
+ success Entities::GpgKey
end
params do
use :pagination
end
get 'gpg_keys' do
- present paginate(current_user.gpg_keys), with: Entities::GPGKey
+ present paginate(current_user.gpg_keys), with: Entities::GpgKey
end
desc 'Get a single GPG key owned by currently authenticated user' do
detail 'This feature was added in GitLab 10.0'
- success Entities::GPGKey
+ success Entities::GpgKey
end
params do
requires :key_id, type: Integer, desc: 'The ID of the GPG key'
@@ -767,13 +767,13 @@ module API
key = current_user.gpg_keys.find_by(id: params[:key_id])
not_found!('GPG Key') unless key
- present key, with: Entities::GPGKey
+ present key, with: Entities::GpgKey
end
# rubocop: enable CodeReuse/ActiveRecord
desc 'Add a new GPG key to the currently authenticated user' do
detail 'This feature was added in GitLab 10.0'
- success Entities::GPGKey
+ success Entities::GpgKey
end
params do
requires :key, type: String, desc: 'The new GPG key'
@@ -782,7 +782,7 @@ module API
key = current_user.gpg_keys.new(declared_params)
if key.save
- present key, with: Entities::GPGKey
+ present key, with: Entities::GpgKey
else
render_validation_error!(key)
end