DEV: Use the `only` option when returning groups as json (#296)

This commit is contained in:
Jan Cernik 2024-06-26 16:43:11 -03:00 committed by GitHub
parent e8beeca5c5
commit 489aacf156
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ module ::DiscourseDataExplorer
end
def groups
render json: Group.all.select(:id, :name), root: false
render json: Group.all.select(:id, :name).as_json(only: %i[id name]), root: false
end
def group_reports_index