gitlab-org--gitlab-foss/app/controllers/dashboard/labels_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
481 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Dashboard::LabelsController < Dashboard::ApplicationController
feature_category :team_planning
urgency :low
def index
respond_to do |format|
2017-05-05 18:47:32 -04:00
format.json { render json: LabelSerializer.new.represent_appearance(labels) }
end
end
2017-07-07 08:54:49 -04:00
def labels
finder_params = { project_ids: projects.select(:id) }
LabelsFinder.new(current_user, finder_params).execute
.select('DISTINCT ON (labels.title) labels.*')
2017-07-07 08:54:49 -04:00
end
end