Use as_json to export points data

This commit is contained in:
Eugene Burmakin 2025-06-25 22:23:56 +02:00
parent 36e426433e
commit dd87f57971

View file

@ -6,7 +6,7 @@ class Users::ExportData::Points
end
def call
points_data = Point.where(user_id: user.id).order(id: :asc)
points_data = Point.where(user_id: user.id).order(id: :asc).as_json(except: %w[user_id])
return [] if points_data.empty?