0
0
Fork 0

Change REST API to return empty data for suspended accounts (#14765)

This commit is contained in:
Eugen Rochko 2020-09-11 15:16:29 +02:00 committed by GitHub
parent e6d67f85e2
commit e6b272e5c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 79 additions and 30 deletions

View file

@ -18,6 +18,8 @@ class Api::V1::BlocksController < Api::BaseController
def paginated_blocks
@paginated_blocks ||= Block.eager_load(target_account: :account_stat)
.joins(:target_account)
.merge(Account.without_suspended)
.where(account: current_account)
.paginate_by_max_id(
limit_param(DEFAULT_ACCOUNTS_LIMIT),