debian-mirror-gitlab/app/controllers/dashboard/labels_controller.rb
2021-12-11 22:18:48 +05:30

18 lines
466 B
Ruby

# frozen_string_literal: true
class Dashboard::LabelsController < Dashboard::ApplicationController
feature_category :team_planning
def index
respond_to do |format|
format.json { render json: LabelSerializer.new.represent_appearance(labels) }
end
end
def labels
finder_params = { project_ids: projects.select(:id) }
LabelsFinder.new(current_user, finder_params).execute
.select('DISTINCT ON (labels.title) labels.*')
end
end