diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-05-21 00:01:14 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-20 17:01:14 +0200 |
commit | 6c1122a1d99cd58db923148a65b8b1a3dc7abe3d (patch) | |
tree | 3e50f9626228ce763dd313c1f3ca27f4a05a7fc1 | |
parent | d3be2b582af0c3b7d21d5b3caa02e83d17fe1240 (diff) |
Fix block list 500 (#3174)
-rw-r--r-- | app/controllers/api/v1/blocks_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/v1/blocks_controller.rb b/app/controllers/api/v1/blocks_controller.rb index 37f5ea219..b2f3ae512 100644 --- a/app/controllers/api/v1/blocks_controller.rb +++ b/app/controllers/api/v1/blocks_controller.rb @@ -13,8 +13,8 @@ class Api::V1::BlocksController < ApiController .paginate_by_max_id(limit_param(DEFAULT_ACCOUNTS_LIMIT), params[:max_id], params[:since_id])) .to_a - next_path = api_v1_blocks_url(pagination_params(max_id: @accounts.last.blocked_bies.last.id)) if @accounts.size == limit_param(DEFAULT_ACCOUNTS_LIMIT) - prev_path = api_v1_blocks_url(pagination_params(since_id: @accounts.first.blocked_bies.first.id)) unless @accounts.empty? + next_path = api_v1_blocks_url(pagination_params(max_id: @accounts.last.blocked_by_ids.last)) if @accounts.size == limit_param(DEFAULT_ACCOUNTS_LIMIT) + prev_path = api_v1_blocks_url(pagination_params(since_id: @accounts.first.blocked_by_ids.first)) unless @accounts.empty? set_pagination_headers(next_path, prev_path) end |