fix: pageIndex等类型转化

This commit is contained in:
chaosBreaking
2019-09-07 17:24:26 +08:00
parent 159bae12d9
commit a9566a2a06

View File

@@ -50,7 +50,7 @@ module.exports = {
const { pageIndex = 1, pageSize = 0 } = req.query; const { pageIndex = 1, pageSize = 0 } = req.query;
return await Action.find({ return await Action.find({
userId userId
}, actionFilter).skip((pageIndex - 1) * pageSize).limit(pageSize) }, actionFilter).skip((+pageIndex - 1) * +pageSize).limit(+pageSize)
.exec().then(data => { .exec().then(data => {
return res.json({ return res.json({
code: 0, code: 0,