Limit what label fields we expose on Dashboard::LabelsController#index
This commit is contained in:
parent
933ebb8f9b
commit
504682db9e
|
@ -1,7 +1,9 @@
|
||||||
class Dashboard::LabelsController < Dashboard::ApplicationController
|
class Dashboard::LabelsController < Dashboard::ApplicationController
|
||||||
def index
|
def index
|
||||||
|
labels = LabelsFinder.new(current_user).execute
|
||||||
|
|
||||||
respond_to do |format|
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue