parse vars in filer routes

This commit is contained in:
Dani Herrero 2017-10-17 09:40:56 +02:00
parent 22ccf278a4
commit 09f54b40d0
1 changed files with 4 additions and 4 deletions

View File

@ -16,16 +16,16 @@ module.exports = function(Delivery) {
]
},
skip: (params.page - 1) * params.size,
limit: params.size
skip: (parseInt(params.page, 10) - 1) * parseInt(params.size, 10),
limit: parseInt(params.size, 10)
};
}
function andWhere(params) {
let filters = {
where: {},
skip: (params.page - 1) * params.size,
limit: params.size
skip: (parseInt(params.page, 10) - 1) * parseInt(params.size, 10),
limit: parseInt(params.size, 10)
};
delete params.page;