Limit what label fields we expose on Groups::LabelsController#index
This commit is contained in:
parent
504682db9e
commit
36fee24c80
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue