summaryrefslogtreecommitdiff
path: root/app/controllers/groups/labels_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/groups/labels_controller.rb')
-rw-r--r--app/controllers/groups/labels_controller.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/groups/labels_controller.rb b/app/controllers/groups/labels_controller.rb
index f3a9e591c3e..ac1d97dc54a 100644
--- a/app/controllers/groups/labels_controller.rb
+++ b/app/controllers/groups/labels_controller.rb
@@ -14,7 +14,14 @@ class Groups::LabelsController < Groups::ApplicationController
end
format.json do
- available_labels = LabelsFinder.new(current_user, group_id: @group.id).execute
+ available_labels = LabelsFinder.new(
+ current_user,
+ group_id: @group.id,
+ only_group_labels: params[:only_group_labels],
+ include_ancestor_groups: params[:include_ancestor_groups],
+ include_descendant_groups: params[:include_descendant_groups]
+ ).execute
+
render json: LabelSerializer.new.represent_appearance(available_labels)
end
end