Add per_page to methods that return collections

This commit is contained in:
Justin Edmund 2022-12-21 23:15:17 -08:00
parent 5c97488a20
commit 415ef39158
2 changed files with 12 additions and 6 deletions

View file

@ -69,8 +69,9 @@ module Api
view: :collection, view: :collection,
root: :results, root: :results,
meta: { meta: {
count: count,
total_pages: total_pages, total_pages: total_pages,
count: count per_page: PER_PAGE
}) })
end end
@ -93,8 +94,9 @@ module Api
view: :collection, view: :collection,
root: :results, root: :results,
meta: { meta: {
count: count,
total_pages: total_pages, total_pages: total_pages,
count: count per_page: PER_PAGE
}) })
end end

View file

@ -39,7 +39,8 @@ module Api
render json: CharacterBlueprint.render(paginated, meta: { render json: CharacterBlueprint.render(paginated, meta: {
count: count, count: count,
total_pages: total_pages(count) total_pages: total_pages(count),
per_page: PER_PAGE
}) })
end end
@ -73,7 +74,8 @@ module Api
render json: WeaponBlueprint.render(paginated, meta: { render json: WeaponBlueprint.render(paginated, meta: {
count: count, count: count,
total_pages: total_pages(count) total_pages: total_pages(count),
per_page: PER_PAGE
}) })
end end
@ -102,7 +104,8 @@ module Api
render json: SummonBlueprint.render(paginated, meta: { render json: SummonBlueprint.render(paginated, meta: {
count: count, count: count,
total_pages: total_pages(count) total_pages: total_pages(count),
per_page: PER_PAGE
}) })
end end
@ -161,7 +164,8 @@ module Api
render json: JobSkillBlueprint.render(paginated, meta: { render json: JobSkillBlueprint.render(paginated, meta: {
count: count, count: count,
total_pages: total_pages(count) total_pages: total_pages(count),
per_page: PER_PAGE
}) })
end end