Updated GroupCollectionTimeline, GroupTimeline to insert pagingation headers only if min is met

• Updated:
- GroupCollectionTimeline, GroupTimeline to insert pagingation headers only if min is met
This commit is contained in:
mgabdev 2020-08-10 22:22:08 -05:00
parent d3e55d28c4
commit b353c835af
2 changed files with 6 additions and 2 deletions

View File

@ -5,7 +5,9 @@ class Api::V1::Timelines::GroupCollectionController < Api::BaseController
before_action :set_sort_type
before_action :set_statuses
after_action :insert_pagination_headers, unless: -> { @statuses.empty? }
after_action :insert_pagination_headers, unless: -> {
@statuses.empty? || @statuses.length < DEFAULT_STATUSES_LIMIT
}
def show
if current_user

View File

@ -5,7 +5,9 @@ class Api::V1::Timelines::GroupController < Api::BaseController
before_action :set_sort_type
before_action :set_statuses
after_action :insert_pagination_headers, unless: -> { @statuses.empty? }
after_action :insert_pagination_headers, unless: -> {
@statuses.empty? || @statuses.length < DEFAULT_STATUSES_LIMIT
}
def show
if current_user