Merge queries in Api::V1::FavouritesController (#4359)
This commit is contained in:
parent
e5c0aa6493
commit
a6ea7e282f
1 changed files with 1 additions and 3 deletions
|
@ -20,9 +20,7 @@ class Api::V1::FavouritesController < Api::BaseController
|
||||||
|
|
||||||
def cached_favourites
|
def cached_favourites
|
||||||
cache_collection(
|
cache_collection(
|
||||||
Status.where(
|
Status.reorder(nil).joins(:favourites).merge(results),
|
||||||
id: results.map(&:status_id)
|
|
||||||
),
|
|
||||||
Status
|
Status
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue