Fix call to inefficient delete_matched
cache method in domain blocks (#28374)
This commit is contained in:
parent
f4b9c2ba40
commit
7d9b209fe8
11 changed files with 96 additions and 50 deletions
|
@ -25,6 +25,6 @@ class Api::V1::Accounts::NotesController < Api::BaseController
|
|||
end
|
||||
|
||||
def relationships_presenter
|
||||
AccountRelationshipsPresenter.new([@account.id], current_user.account_id)
|
||||
AccountRelationshipsPresenter.new([@account], current_user.account_id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,6 +25,6 @@ class Api::V1::Accounts::PinsController < Api::BaseController
|
|||
end
|
||||
|
||||
def relationships_presenter
|
||||
AccountRelationshipsPresenter.new([@account.id], current_user.account_id)
|
||||
AccountRelationshipsPresenter.new([@account], current_user.account_id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ class Api::V1::Accounts::RelationshipsController < Api::BaseController
|
|||
before_action :require_user!
|
||||
|
||||
def index
|
||||
@accounts = Account.where(id: account_ids).select('id')
|
||||
@accounts = Account.where(id: account_ids).select(:id, :domain)
|
||||
@accounts.merge!(Account.without_suspended) unless truthy_param?(:with_suspended)
|
||||
render json: @accounts, each_serializer: REST::RelationshipSerializer, relationships: relationships
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue