summaryrefslogtreecommitdiff
path: root/lib/api/custom_attributes_endpoints.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/custom_attributes_endpoints.rb')
-rw-r--r--lib/api/custom_attributes_endpoints.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/api/custom_attributes_endpoints.rb b/lib/api/custom_attributes_endpoints.rb
index 2149e04451e..d697d8b9f88 100644
--- a/lib/api/custom_attributes_endpoints.rb
+++ b/lib/api/custom_attributes_endpoints.rb
@@ -12,14 +12,14 @@ module API
helpers do
params :custom_attributes_key do
- requires :key, type: String, desc: 'The key of the custom attribute'
+ requires :key, type: String, desc: "The key of the custom attribute"
end
end
desc "Get all custom attributes on a #{attributable_name}" do
success Entities::CustomAttribute
end
- get ':id/custom_attributes' do
+ get ":id/custom_attributes" do
resource = public_send(attributable_finder, params[:id]) # rubocop:disable GitlabSecurity/PublicSend
authorize! :read_custom_attribute
@@ -33,7 +33,7 @@ module API
use :custom_attributes_key
end
# rubocop: disable CodeReuse/ActiveRecord
- get ':id/custom_attributes/:key' do
+ get ":id/custom_attributes/:key" do
resource = public_send(attributable_finder, params[:id]) # rubocop:disable GitlabSecurity/PublicSend
authorize! :read_custom_attribute
@@ -46,10 +46,10 @@ module API
desc "Set a custom attribute on a #{attributable_name}"
params do
use :custom_attributes_key
- requires :value, type: String, desc: 'The value of the custom attribute'
+ requires :value, type: String, desc: "The value of the custom attribute"
end
# rubocop: disable CodeReuse/ActiveRecord
- put ':id/custom_attributes/:key' do
+ put ":id/custom_attributes/:key" do
resource = public_send(attributable_finder, params[:id]) # rubocop:disable GitlabSecurity/PublicSend
authorize! :update_custom_attribute
@@ -71,7 +71,7 @@ module API
use :custom_attributes_key
end
# rubocop: disable CodeReuse/ActiveRecord
- delete ':id/custom_attributes/:key' do
+ delete ":id/custom_attributes/:key" do
resource = public_send(attributable_finder, params[:id]) # rubocop:disable GitlabSecurity/PublicSend
authorize! :update_custom_attribute