Explorar o código

add || 30 in bookmarks.js and revision.js

zahmis %!s(int64=5) %!d(string=hai) anos
pai
achega
05798eaa35

+ 2 - 1
src/server/routes/apiv3/bookmarks.js

@@ -149,7 +149,8 @@ module.exports = (crowi) => {
 
 
   router.get('/:userId', accessTokenParser, loginRequired, validator.myBookmarkList, apiV3FormValidator, async(req, res) => {
   router.get('/:userId', accessTokenParser, loginRequired, validator.myBookmarkList, apiV3FormValidator, async(req, res) => {
     const { userId } = req.params;
     const { userId } = req.params;
-    const { page, limit } = req.query;
+    const page = req.query.page;
+    const limit = req.query.limit || 30;
     if (userId == null) {
     if (userId == null) {
       return res.apiv3Err('User id is not found or forbidden', 400);
       return res.apiv3Err('User id is not found or forbidden', 400);
     }
     }

+ 1 - 1
src/server/routes/apiv3/revisions.js

@@ -97,7 +97,7 @@ module.exports = (crowi) => {
    */
    */
   router.get('/list', certifySharedPage, accessTokenParser, loginRequired, validator.retrieveRevisions, apiV3FormValidator, async(req, res) => {
   router.get('/list', certifySharedPage, accessTokenParser, loginRequired, validator.retrieveRevisions, apiV3FormValidator, async(req, res) => {
     const pageId = req.query.pageId;
     const pageId = req.query.pageId;
-    const pagingLimit = req.query.pagingLimit;
+    const pagingLimit = req.query.pagingLimit || 10;
     const { isSharedPage } = req;
     const { isSharedPage } = req;
 
 
     const selectedPage = parseInt(req.query.selectedPage) || 1;
     const selectedPage = parseInt(req.query.selectedPage) || 1;