summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard/labels_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/dashboard/labels_controller.rb')
-rw-r--r--app/controllers/dashboard/labels_controller.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/dashboard/labels_controller.rb b/app/controllers/dashboard/labels_controller.rb
index 89d87c2d5c8..b661efa12c0 100644
--- a/app/controllers/dashboard/labels_controller.rb
+++ b/app/controllers/dashboard/labels_controller.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
class Dashboard::LabelsController < Dashboard::ApplicationController
+ feature_category :issue_tracking
+
def index
respond_to do |format|
format.json { render json: LabelSerializer.new.represent_appearance(labels) }
@@ -9,8 +11,8 @@ class Dashboard::LabelsController < Dashboard::ApplicationController
def labels
finder_params = { project_ids: projects.select(:id) }
- labels = LabelsFinder.new(current_user, finder_params).execute
- GlobalLabel.build_collection(labels)
+ LabelsFinder.new(current_user, finder_params).execute
+ .select('DISTINCT ON (labels.title) labels.*')
end
end