fix: 修改pageSize和pageIndex的默认值
This commit is contained in:
@@ -28,7 +28,7 @@ module.exports = {
|
||||
},
|
||||
async getActions (req, res) {
|
||||
const { userId } = res.locals.user;
|
||||
const { pageIndex = 0, pageSize = 0 } = req.query;
|
||||
const { pageIndex = 1, pageSize = 0 } = req.query;
|
||||
return await Action.find({
|
||||
userId
|
||||
}, actionFilter).skip((pageIndex - 1) * pageSize).limit(pageSize)
|
||||
|
||||
Reference in New Issue
Block a user