modqueue: remove posts per page cookie.

This commit is contained in:
evazion
2020-02-29 13:43:01 -06:00
parent 980103e443
commit 72210c0226
2 changed files with 1 additions and 12 deletions

View File

@@ -6,19 +6,9 @@ module Moderator
skip_before_action :api_check
def show
if search_params[:per_page]
cookies.permanent["mq_per_page"] = search_params[:per_page]
end
@posts = ::Post.includes(:appeals, :disapprovals, :uploader, flags: [:creator]).reorder(id: :asc).pending_or_flagged.available_for_moderation(search_params[:hidden]).tag_match(search_params[:tags]).paginate(params[:page], :limit => per_page)
@posts = ::Post.includes(:appeals, :disapprovals, :uploader, flags: [:creator]).reorder(id: :asc).pending_or_flagged.available_for_moderation(search_params[:hidden]).tag_match(search_params[:tags]).paginated_search(params, count_pages: true)
respond_with(@posts)
end
protected
def per_page
cookies["mq_per_page"] || search_params[:per_page] || 25
end
end
end
end