summaryrefslogtreecommitdiff
path: root/lib/api/helpers/label_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers/label_helpers.rb')
-rw-r--r--lib/api/helpers/label_helpers.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/helpers/label_helpers.rb b/lib/api/helpers/label_helpers.rb
index c11e7d614ab..69cdc25aa00 100644
--- a/lib/api/helpers/label_helpers.rb
+++ b/lib/api/helpers/label_helpers.rb
@@ -6,16 +6,16 @@ module API
extend Grape::API::Helpers
params :label_create_params do
- requires :name, type: String, desc: 'The name of the label to be created'
+ requires :name, type: String, desc: "The name of the label to be created"
requires :color, type: String, desc: "The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the allowed CSS color names"
- optional :description, type: String, desc: 'The description of label to be created'
+ optional :description, type: String, desc: "The description of label to be created"
end
def find_label(parent, id, include_ancestor_groups: true)
labels = available_labels_for(parent, include_ancestor_groups: include_ancestor_groups)
label = labels.find_by_id(id) || labels.find_by_title(id)
- label || not_found!('Label')
+ label || not_found!("Label")
end
def get_labels(parent, entity)
@@ -26,7 +26,7 @@ module API
authorize! :admin_label, parent
label = available_labels_for(parent).find_by_title(params[:name])
- conflict!('Label already exists') if label
+ conflict!("Label already exists") if label
priority = params.delete(:priority)
label_params = declared_params(include_missing: false)