Browse Source

fix lint error

= 5 năm trước cách đây
mục cha
commit
3bf48a0d2a
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      src/server/routes/apiv3/page.js

+ 4 - 1
src/server/routes/apiv3/page.js

@@ -203,9 +203,12 @@ module.exports = (crowi) => {
       if (revisionId) {
         markdown = '#Revision';
       }
-      else {
+      else if (pageId) {
         markdown = '#Page';
       }
+      else {
+        return res.apiv3Err('Should provided pageId or revisionId');
+      }
 
       return res.apiv3({ markdown });
     }