Optimize follower_accounts and following_accounts (#2820)
This commit is contained in:
@ -4,6 +4,6 @@ class FollowerAccountsController < ApplicationController
|
||||
include AccountControllerConcern
|
||||
|
||||
def index
|
||||
@accounts = @account.followers.page(params[:page]).per(FOLLOW_PER_PAGE)
|
||||
@follows = Follow.where(target_account: @account).order(id: :desc).page(params[:page]).per(FOLLOW_PER_PAGE).preload(:account)
|
||||
end
|
||||
end
|
||||
|
@ -4,6 +4,6 @@ class FollowingAccountsController < ApplicationController
|
||||
include AccountControllerConcern
|
||||
|
||||
def index
|
||||
@accounts = @account.following.page(params[:page]).per(FOLLOW_PER_PAGE)
|
||||
@follows = Follow.where(account: @account).order(id: :desc).page(params[:page]).per(FOLLOW_PER_PAGE).preload(:target_account)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user