更改:评论列表分页数量限制变大
This commit is contained in:
parent
5580a96fe7
commit
620ed26e45
|
@ -23,7 +23,7 @@ class Api::V1::BaseController < ApplicationController
|
|||
|
||||
def kaminary_select_paginate(relation)
|
||||
limit = params[:limit] || params[:per_page]
|
||||
limit = (limit.to_i.zero? || limit.to_i > 100) ? 100 : limit.to_i
|
||||
limit = (limit.to_i.zero? || limit.to_i > 200) ? 200 : limit.to_i
|
||||
page = params[:page].to_i.zero? ? 1 : params[:page].to_i
|
||||
|
||||
relation.page(page).per(limit)
|
||||
|
|
|
@ -10,7 +10,7 @@ class Api::V1::Issues::JournalsController < Api::V1::BaseController
|
|||
@total_journals_count = @object_result[:total_journals_count]
|
||||
@total_operate_journals_count = @object_result[:total_operate_journals_count]
|
||||
@total_comment_journals_count = @object_result[:total_comment_journals_count]
|
||||
@journals = kaminari_paginate(@object_result[:data])
|
||||
@journals = kaminary_select_paginate(@object_result[:data])
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
Loading…
Reference in New Issue