|
|
@@ -163,7 +163,7 @@ module.exports = (crowi) => {
|
|
|
recent: [
|
|
|
query('limit').optional().isInt().withMessage('limit must be integer'),
|
|
|
query('offset').optional().isInt().withMessage('offset must be integer'),
|
|
|
- query('includeWipPage').optional().isBoolean().withMessage('includeWipPages must be boolean'),
|
|
|
+ query('includeWipPage').optional().isBoolean().withMessage('includeWipPage must be boolean'),
|
|
|
],
|
|
|
renamePage: [
|
|
|
body('pageId').isMongoId().withMessage('pageId is required'),
|
|
|
@@ -224,7 +224,7 @@ module.exports = (crowi) => {
|
|
|
router.get('/recent', accessTokenParser, loginRequired, validator.recent, apiV3FormValidator, async(req, res) => {
|
|
|
const limit = parseInt(req.query.limit) || 20;
|
|
|
const offset = parseInt(req.query.offset) || 0;
|
|
|
- const includeWipPage = JSON.parse(req.query.includeWipPage ?? true); // String to boolean, Requires validation by express-validator before conversion
|
|
|
+ const includeWipPage = req.query.includeWipPage === 'true'; // Need validation using express-validator
|
|
|
|
|
|
const queryOptions = {
|
|
|
offset,
|