about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/api/v1/favourites_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/api/v1/favourites_controller.rb b/app/controllers/api/v1/favourites_controller.rb
index 92c0a62a9..9d73bb337 100644
--- a/app/controllers/api/v1/favourites_controller.rb
+++ b/app/controllers/api/v1/favourites_controller.rb
@@ -20,9 +20,7 @@ class Api::V1::FavouritesController < Api::BaseController
 
   def cached_favourites
     cache_collection(
-      Status.where(
-        id: results.map(&:status_id)
-      ),
+      Status.reorder(nil).joins(:favourites).merge(results),
       Status
     )
   end