Welcome to mirror list, hosted at ThFree Co, Russian Federation.

labels_controller.rb « dashboard « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 89d87c2d5c872ebca389f3d7d0372159c2946ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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