+ if (!await doesUnblockServerExist(serverActor.Account.id, req.params.host, res)) return
+
+ return next()
+ }
+]
+
+const blocklistStatusValidator = [
+ query('hosts')
+ .optional()
+ .customSanitizer(arrayify)
+ .custom(isEachUniqueHostValid).withMessage('Should have a valid hosts array'),
+
+ query('accounts')
+ .optional()
+ .customSanitizer(arrayify)
+ .custom(areValidActorHandles).withMessage('Should have a valid accounts array'),
+
+ (req: express.Request, res: express.Response, next: express.NextFunction) => {
+ if (areValidationErrors(req, res)) return