Ver Fonte

fix validation

zahmis há 5 anos atrás
pai
commit
631b48509d
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/server/routes/apiv3/slack-bot-setting.js

+ 2 - 2
src/server/routes/apiv3/slack-bot-setting.js

@@ -23,8 +23,8 @@ module.exports = (crowi) => {
 
   const validator = {
     CusotmBotSettings: [
-      body('slackSigningSecret').exists().not().isEmpty({ ignore_whitespace: true }),
-      body('slackBotToken').exists().not().isEmpty({ ignore_whitespace: true }),
+      body('slackSigningSecret').if(value => value != null).isString(),
+      body('slackBotToken').if(value => value != null).isString(),
     ],
   };