0
0
Fork 0

Fix regressions in api/v1 (#3178)

The regressions are introduced at commit
f554807563 by me (Akihiko Odaki)
This commit is contained in:
Akihiko Odaki 2017-05-21 00:48:34 +09:00 committed by Eugen Rochko
parent 8f4b7c1820
commit 22cb286ad7
3 changed files with 9 additions and 8 deletions

View file

@ -9,6 +9,7 @@ class Api::V1::FollowRequestsController < ApiController
.references(:follow_requests)
.merge(FollowRequest.where(target_account: current_account)
.paginate_by_max_id(DEFAULT_ACCOUNTS_LIMIT, params[:max_id], params[:since_id]))
.to_a
next_path = api_v1_follow_requests_url(pagination_params(max_id: @accounts.last.follow_requests.last.id)) if @accounts.size == DEFAULT_ACCOUNTS_LIMIT
prev_path = api_v1_follow_requests_url(pagination_params(since_id: @accounts.first.follow_requests.first.id)) unless @accounts.empty?