+const blocklistStatusValidator = [
+ query('hosts')
+ .optional()
+ .customSanitizer(toArray)
+ .custom(isEachUniqueHostValid).withMessage('Should have a valid hosts array'),
+
+ query('accounts')
+ .optional()
+ .customSanitizer(toArray)
+ .custom(areValidActorHandles).withMessage('Should have a valid accounts array'),
+
+ (req: express.Request, res: express.Response, next: express.NextFunction) => {
+ logger.debug('Checking blocklistStatusValidator parameters', { query: req.query })
+
+ if (areValidationErrors(req, res)) return
+
+ return next()
+ }
+]
+