Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2018-01-24 11:44:07 +0300
committerToon Claes <toon@gitlab.com>2018-01-24 11:44:07 +0300
commit45b62dfd324318959ff6fa37f9d3f8a1a95b4aa7 (patch)
treebeeed9700cbaa4c57c1b3a72a30d9409b43a1d31 /lib/api/applications.rb
parentd38faa30ed6fb79964b25fce843cb57db1bdb198 (diff)
Make the exposing of the Application secret more explicit
To make it more clear to developers that the entity exposes the application secret, define a separate entity that only should be used when the secret is needed (probably only on creation).
Diffstat (limited to 'lib/api/applications.rb')
-rw-r--r--lib/api/applications.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/applications.rb b/lib/api/applications.rb
index 142ba73a53d..b122cdefe4e 100644
--- a/lib/api/applications.rb
+++ b/lib/api/applications.rb
@@ -6,7 +6,7 @@ module API
resource :applications do
desc 'Create a new application' do
detail 'This feature was introduced in GitLab 10.5'
- success Entities::Application
+ success Entities::ApplicationWithSecret
end
params do
requires :name, type: String, desc: 'Application name'
@@ -17,7 +17,7 @@ module API
application = Doorkeeper::Application.new(declared_params)
if application.save
- present application, with: Entities::Application
+ present application, with: Entities::ApplicationWithSecret
else
render_validation_error! application
end