summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard/labels_controller.rb
blob: 797f8503b2daad1792b6453a7c3a0cb9f7b3ac4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
class Dashboard::LabelsController < Dashboard::ApplicationController
  def index
    labels = LabelsFinder.new(current_user, project_id: projects)
                         .execute
                         .select(:id, :title, :color)
                         .uniq(:title)

    respond_to do |format|
      format.json { render json: labels }
    end
  end
end