Updated Explore,Group,GroupCollection timeline controllers unauth result limits
• Updated: - Explore,Group,GroupCollection timeline controllers unauth result limits to be max 2 pages (group still empty for now) - Max limit to be 25 (for everything, unless provided default) in BaseController
This commit is contained in:
@@ -48,7 +48,8 @@ class Api::V1::Timelines::ExploreController < Api::BaseController
|
||||
FeedManager.instance.filter?(:home, status, current_account.id)
|
||||
}
|
||||
else
|
||||
SortingQueryBuilder.new.call(@sort_type, nil, params[:page])
|
||||
page = [params[:page].to_i.abs, MIN_UNAUTHENTICATED_PAGES].min
|
||||
SortingQueryBuilder.new.call(@sort_type, nil, page)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -71,7 +71,8 @@ class Api::V1::Timelines::GroupCollectionController < Api::BaseController
|
||||
FeedManager.instance.filter?(:home, status, current_account.id)
|
||||
}
|
||||
else
|
||||
SortingQueryBuilder.new.call(@sort_type, @groupIds, params[:page])
|
||||
page = [params[:page].to_i.abs, MIN_UNAUTHENTICATED_PAGES].min
|
||||
SortingQueryBuilder.new.call(@sort_type, @groupIds, page)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ class Api::V1::Timelines::GroupController < Api::BaseController
|
||||
}
|
||||
else
|
||||
return []
|
||||
# SortingQueryBuilder.new.call(@sort_type, @group, params[:page])
|
||||
# page = [params[:page].to_i.abs, MIN_UNAUTHENTICATED_PAGES].min
|
||||
# SortingQueryBuilder.new.call(@sort_type, @group, page)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user