parse vars in filer routes
This commit is contained in:
parent
22ccf278a4
commit
09f54b40d0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue