shinoka7 6 лет назад
Родитель
Сommit
e45752cb52
1 измененных файлов с 0 добавлено и 19 удалено
  1. 0 19
      src/server/form/comment.js

+ 0 - 19
src/server/form/comment.js

@@ -1,19 +0,0 @@
-const { body } = require('express-validator/check');
-const mongoose = require('mongoose');
-
-const ObjectId = mongoose.Schema.Types.ObjectId;
-module.exports = [
-  body('commentForm.page_id').exists(),
-  body('commentForm.revision_id').exists(),
-  body('commentForm.comment').exists(),
-  body('commentForm.comment_position').isInt(),
-  body('commentForm.is_markdown').isBoolean(),
-  body('commentForm.replyTo').exists().custom((value) => {
-    if (value === '') {
-      return undefined;
-    }
-    return ObjectId(value);
-  }),
-
-  body('slackNotificationForm.isSlackEnabled').isBoolean().exists(),
-];