summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard/labels_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/dashboard/labels_controller.rb')
-rw-r--r--app/controllers/dashboard/labels_controller.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/dashboard/labels_controller.rb b/app/controllers/dashboard/labels_controller.rb
new file mode 100644
index 00000000000..2a88350a4ca
--- /dev/null
+++ b/app/controllers/dashboard/labels_controller.rb
@@ -0,0 +1,9 @@
+class Dashboard::LabelsController < Dashboard::ApplicationController
+ def index
+ labels = Label.where(project_id: projects).select(:id, :title, :color).uniq(:title)
+
+ respond_to do |format|
+ format.json { render json: labels }
+ end
+ end
+end