terminada

This commit is contained in:
2022-05-17 00:01:12 -05:00
parent 41cdbe07e5
commit b03c77658a
3 changed files with 26 additions and 2 deletions
@@ -0,0 +1,13 @@
const Premiacion = require('../../db/tablas/Premiacion');
const { validarNumeroEntero } = require('../../helper/validar');
const getPaginacion = async (query) => {
const pagina = validarNumeroEntero(query.pagina, 'página', false);
return Premiacion.findAndCountAll({
limit: 25,
offset: 25 * (pagina - 1),
});
};
module.exports = getPaginacion;