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

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

@@ -39,7 +39,7 @@ module.exports = (crowi) => {
     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),
+    body('expiration').isAfter(today.toString()).withMessage('Your Selected date is past'),
 
     // validate the length of description is max 100.
     body('description').isLength({ min: 0, max: 100 }),