Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop

This commit is contained in:
xxq250 2023-03-07 09:49:24 +08:00
commit d0209490c6
2 changed files with 2 additions and 2 deletions
app/controllers/api/v1

View File

@ -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)

View File

@ -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