globalNotification.js 787 B

123456789101112131415161718
  1. 'use strict';
  2. const form = require('express-form');
  3. const field = form.field;
  4. module.exports = form(
  5. field('globalNotification[triggerPath]').trim(),
  6. field('globalNotification[notifyToType]').trim(),
  7. field('globalNotification[toEmail]').trim(),
  8. field('globalNotification[slackChannels]').trim(),
  9. field('globalNotification[triggerEvent:pageCreate]').trim().toBooleanStrict(),
  10. field('globalNotification[triggerEvent:pageEdit]').trim().toBooleanStrict(),
  11. field('globalNotification[triggerEvent:pageDelete]').trim().toBooleanStrict(),
  12. field('globalNotification[triggerEvent:pageMove]').trim().toBooleanStrict(),
  13. field('globalNotification[triggerEvent:pageLike]').trim().toBooleanStrict(),
  14. field('globalNotification[triggerEvent:comment]').trim().toBooleanStrict(),
  15. );