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

parent 504682db
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment