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
1 changed files with 2 additions and 1 deletions

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