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

This commit is contained in:
Douglas Barbosa Alexandre 2016-10-11 14:46:07 -03:00
parent 504682db9e
commit 36fee24c80

View file

@ -14,7 +14,8 @@ class Groups::LabelsController < Groups::ApplicationController
end
format.json do
render json: LabelsFinder.new(current_user, group_id: @group.id).execute
available_labels = LabelsFinder.new(current_user, group_id: @group.id).execute
render json: available_labels.as_json(only: [:id, :title, :color])
end
end
end