mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
Preload tag to prevent n+1 (#37154)
This commit is contained in:
@@ -70,6 +70,7 @@ class Api::V1Alpha::CollectionsController < Api::BaseController
|
||||
|
||||
def set_collections
|
||||
@collections = @account.collections
|
||||
.with_tag
|
||||
.with_item_count
|
||||
.order(created_at: :desc)
|
||||
.offset(offset_param)
|
||||
|
||||
Reference in New Issue
Block a user