diff --git a/app/controllers/api/users_controller.rb b/app/controllers/api/users_controller.rb index 0178383..b222102 100644 --- a/app/controllers/api/users_controller.rb +++ b/app/controllers/api/users_controller.rb @@ -75,7 +75,7 @@ def status @userStatuses = Array.new - Status.all.each do |status| + Status.order('created_at DESC').all.each do |status| if status.created_at.to_i + status.lifetime < Time.now.to_i status.destroy next