ryuichi-e пре 5 година
родитељ
комит
2b169f5364
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/server/routes/apiv3/share-links.js

+ 2 - 2
src/server/routes/apiv3/share-links.js

@@ -35,8 +35,8 @@ module.exports = (crowi) => {
   });
 
   validator.shareLinkStatus = [
-    // validate page id is not empty.
-    body('pageId').not().isEmpty(),
+    // validate the page id is null
+    body('pageId').not().isEmpty().withMessage('Page Id is null'),
 
     // validate expireation date is not empty, is not before today and is date.
     body('expiration').not().isEmpty().isBefore(today.toString),