mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 07:23:43 +01:00
Change GET /api/v1/directory
to use database replica rather than primary (#26856)
This commit is contained in:
parent
4d9186a48c
commit
33c8708a1a
1 changed files with 3 additions and 1 deletions
|
@ -16,8 +16,10 @@ class Api::V1::DirectoriesController < Api::BaseController
|
|||
end
|
||||
|
||||
def set_accounts
|
||||
with_read_replica do
|
||||
@accounts = accounts_scope.offset(params[:offset]).limit(limit_param(DEFAULT_ACCOUNTS_LIMIT))
|
||||
end
|
||||
end
|
||||
|
||||
def accounts_scope
|
||||
Account.discoverable.tap do |scope|
|
||||
|
|
Loading…
Reference in a new issue