+const accountsNameWithHostGetValidator = [
+ param('accountName').exists().withMessage('Should have an account name with host'),
+
+ async (req: express.Request, res: express.Response, next: express.NextFunction) => {
+ logger.debug('Checking accountsNameWithHostGetValidator parameters', { parameters: req.params })
+
+ if (areValidationErrors(req, res)) return
+ if (!await isAccountNameWithHostExist(req.params.accountName, res)) return
+
+ return next()
+ }
+]
+