1 import * as express from 'express'
2 import { body } from 'express-validator/check'
3 import { isRootActivityValid, logger } from '../../../helpers'
4 import { checkErrors } from '../utils'
6 const activityPubValidator = [
7 body('').custom((value, { req }) => isRootActivityValid(req.body)),
9 (req: express.Request, res: express.Response, next: express.NextFunction) => {
10 logger.debug('Checking activity pub parameters', { parameters: req.body })
12 checkErrors(req, res, next)
16 // ---------------------------------------------------------------------------