debian-mirror-gitlab/app/controllers/dashboard/labels_controller.rb
2018-12-05 23:21:45 +05:30

16 lines
428 B
Ruby

# frozen_string_literal: true
class Dashboard::LabelsController < Dashboard::ApplicationController
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) }
labels = LabelsFinder.new(current_user, finder_params).execute
GlobalLabel.build_collection(labels)
end
end