Limit what label fields we expose on Dashboard::LabelsController#index

This commit is contained in:
Douglas Barbosa Alexandre 2016-10-11 14:39:32 -03:00
parent 933ebb8f9b
commit 504682db9e
1 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,9 @@
class Dashboard::LabelsController < Dashboard::ApplicationController
def index
labels = LabelsFinder.new(current_user).execute
respond_to do |format|
format.json { render json: LabelsFinder.new(current_user).execute }
format.json { render json: labels.as_json(only: [:id, :title, :color]) }
end
end
end