diff options
Diffstat (limited to 'server/middlewares/validators/account.ts')
-rw-r--r-- | server/middlewares/validators/account.ts | 6 |
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 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { param } from 'express-validator/check' | 2 | import { param } from 'express-validator/check' |
3 | import { isAccountNameValid, isAccountNameWithHostExist, isLocalAccountNameExist } from '../../helpers/custom-validators/accounts' | 3 | import { isAccountNameValid, doesAccountNameWithHostExist, doesLocalAccountNameExist } from '../../helpers/custom-validators/accounts' |
4 | import { logger } from '../../helpers/logger' | 4 | import { logger } from '../../helpers/logger' |
5 | import { areValidationErrors } from './utils' | 5 | import { 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 | } |