aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/account.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/account.ts')
-rw-r--r--server/middlewares/validators/account.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/account.ts b/server/middlewares/validators/account.ts
index 88c57eaa1..96e120a38 100644
--- a/server/middlewares/validators/account.ts
+++ b/server/middlewares/validators/account.ts
@@ -1,6 +1,6 @@
1import * as express from 'express' 1import * as express from 'express'
2import { param } from 'express-validator/check' 2import { param } from 'express-validator/check'
3import { isAccountNameValid, isAccountNameWithHostExist, isLocalAccountNameExist } from '../../helpers/custom-validators/accounts' 3import { isAccountNameValid, doesAccountNameWithHostExist, doesLocalAccountNameExist } from '../../helpers/custom-validators/accounts'
4import { logger } from '../../helpers/logger' 4import { logger } from '../../helpers/logger'
5import { areValidationErrors } from './utils' 5import { areValidationErrors } from './utils'
6 6
@@ -11,7 +11,7 @@ const localAccountValidator = [
11 logger.debug('Checking localAccountValidator parameters', { parameters: req.params }) 11 logger.debug('Checking localAccountValidator parameters', { parameters: req.params })
12 12
13 if (areValidationErrors(req, res)) return 13 if (areValidationErrors(req, res)) return
14 if (!await isLocalAccountNameExist(req.params.name, res)) return 14 if (!await doesLocalAccountNameExist(req.params.name, res)) return
15 15
16 return next() 16 return next()
17 } 17 }
@@ -24,7 +24,7 @@ const accountNameWithHostGetValidator = [
24 logger.debug('Checking accountsNameWithHostGetValidator parameters', { parameters: req.params }) 24 logger.debug('Checking accountsNameWithHostGetValidator parameters', { parameters: req.params })
25 25
26 if (areValidationErrors(req, res)) return 26 if (areValidationErrors(req, res)) return
27 if (!await isAccountNameWithHostExist(req.params.accountName, res)) return 27 if (!await doesAccountNameWithHostExist(req.params.accountName, res)) return
28 28
29 return next() 29 return next()
30 } 30 }