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

19 lines
464 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Dashboard::LabelsController < Dashboard::ApplicationController
feature_category :issue_tracking
def index
respond_to do |format|
2017-05-05 22:47:32 +00:00
format.json { render json: LabelSerializer.new.represent_appearance(labels) }
end
end
2017-07-07 12:54:49 +00:00
def labels
finder_params = { project_ids: projects.select(:id) }
labels = LabelsFinder.new(current_user, finder_params).execute
GlobalLabel.build_collection(labels)
end
end