diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-25 03:34:37 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-25 03:34:37 +0100 |
commit | 3e9d794ea50986db5647b4e05a408bf0208bbfa1 (patch) | |
tree | 29648fffca15684b18241aa5df2533526371f22a /app/controllers/api/v1/accounts_controller.rb | |
parent | 9d4cad6307b3d92a2b0a6c43da0aa859e846c44d (diff) |
Add tuning documentation, add <content> tags back to most salmons,
make status pagination headers generation more lax about next page existing
Diffstat (limited to 'app/controllers/api/v1/accounts_controller.rb')
-rw-r--r-- | app/controllers/api/v1/accounts_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 0d02294eb..94dba1d03 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -52,7 +52,7 @@ class Api::V1::AccountsController < ApiController set_maps(@statuses) set_counters_maps(@statuses) - next_path = statuses_api_v1_account_url(max_id: @statuses.last.id) if @statuses.size == limit_param(DEFAULT_STATUSES_LIMIT) + next_path = statuses_api_v1_account_url(max_id: @statuses.last.id) unless @statuses.empty? prev_path = statuses_api_v1_account_url(since_id: @statuses.first.id) unless @statuses.empty? set_pagination_headers(next_path, prev_path) @@ -66,7 +66,7 @@ class Api::V1::AccountsController < ApiController set_maps(@statuses) set_counters_maps(@statuses) - next_path = media_statuses_api_v1_account_url(max_id: @statuses.last.id) if @statuses.size == limit_param(DEFAULT_STATUSES_LIMIT) + next_path = media_statuses_api_v1_account_url(max_id: @statuses.last.id) unless @statuses.empty? prev_path = media_statuses_api_v1_account_url(since_id: @statuses.first.id) unless @statuses.empty? set_pagination_headers(next_path, prev_path) |