mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 14:44:31 +00:00
fix: pageSize meta improved
This commit is contained in:
parent
a154b73e9c
commit
9b244f8816
@ -25,7 +25,7 @@ module.exports = ({ strapi }) => {
|
||||
const { start, limit } = args;
|
||||
|
||||
const total = await strapi.entityService.count(resourceUID, args);
|
||||
const pageSize = limit === -1 ? total : limit;
|
||||
const pageSize = limit === -1 ? total - start : limit;
|
||||
const pageCount = limit === -1 ? 1 : Math.ceil(total / limit);
|
||||
const page = limit === -1 ? 1 : Math.floor(start / limit) + 1;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user