Explorar o código

added limit should not null

ryuichi-e %!s(int64=5) %!d(string=hai) anos
pai
achega
00e99ccfeb
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/server/routes/apiv3/bookmarks.js

+ 3 - 0
src/server/routes/apiv3/bookmarks.js

@@ -153,6 +153,9 @@ module.exports = (crowi) => {
     if (userId == null) {
       return res.apiv3Err('User id is not found or forbidden', 400);
     }
+    if (limit == null) {
+      return res.apiv3Err('Could not catch page limit', 400);
+    }
     try {
       const paginationResult = await Bookmark.paginate(
         {