Removed limits for pagination in GroupCollectionController, GroupTimeline controller
• Removed: - limits for pagination in GroupCollectionController, GroupTimeline controller
This commit is contained in:
parent
80b264be30
commit
5fc517473f
@ -6,7 +6,7 @@ class Api::V1::Timelines::GroupCollectionController < Api::BaseController
|
|||||||
before_action :set_statuses
|
before_action :set_statuses
|
||||||
|
|
||||||
after_action :insert_pagination_headers, unless: -> {
|
after_action :insert_pagination_headers, unless: -> {
|
||||||
@statuses.empty? || @statuses.length < DEFAULT_STATUSES_LIMIT
|
@statuses.empty?
|
||||||
}
|
}
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@ -94,8 +94,6 @@ class Api::V1::Timelines::GroupCollectionController < Api::BaseController
|
|||||||
if @sort_type == 'newest'
|
if @sort_type == 'newest'
|
||||||
statuses = Status.where(
|
statuses = Status.where(
|
||||||
group: @groupIds, reply: false
|
group: @groupIds, reply: false
|
||||||
).where(
|
|
||||||
'statuses.created_at > ?', 14.days.ago
|
|
||||||
).paginate_by_id(
|
).paginate_by_id(
|
||||||
limit_param(DEFAULT_STATUSES_LIMIT),
|
limit_param(DEFAULT_STATUSES_LIMIT),
|
||||||
params_slice(:max_id, :since_id, :min_id)
|
params_slice(:max_id, :since_id, :min_id)
|
||||||
|
@ -6,7 +6,7 @@ class Api::V1::Timelines::GroupController < Api::BaseController
|
|||||||
before_action :set_statuses
|
before_action :set_statuses
|
||||||
|
|
||||||
after_action :insert_pagination_headers, unless: -> {
|
after_action :insert_pagination_headers, unless: -> {
|
||||||
@statuses.empty? || @statuses.length < DEFAULT_STATUSES_LIMIT
|
@statuses.empty?
|
||||||
}
|
}
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@ -74,8 +74,6 @@ class Api::V1::Timelines::GroupController < Api::BaseController
|
|||||||
if @sort_type == 'newest'
|
if @sort_type == 'newest'
|
||||||
statuses = Status.where(
|
statuses = Status.where(
|
||||||
group: @group, reply: false
|
group: @group, reply: false
|
||||||
).where(
|
|
||||||
'statuses.created_at > ?', 14.days.ago
|
|
||||||
).paginate_by_id(
|
).paginate_by_id(
|
||||||
limit_param(DEFAULT_STATUSES_LIMIT),
|
limit_param(DEFAULT_STATUSES_LIMIT),
|
||||||
params_slice(:max_id, :since_id, :min_id)
|
params_slice(:max_id, :since_id, :min_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user