diff options
Diffstat (limited to 'server/middlewares/validators/account.ts')
-rw-r--r-- | server/middlewares/validators/account.ts | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/server/middlewares/validators/account.ts b/server/middlewares/validators/account.ts index a7534ced5..551f67d61 100644 --- a/server/middlewares/validators/account.ts +++ b/server/middlewares/validators/account.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import express from 'express' | 1 | import express from 'express' |
2 | import { param } from 'express-validator' | 2 | import { param } from 'express-validator' |
3 | import { isAccountNameValid } from '../../helpers/custom-validators/accounts' | 3 | import { isAccountNameValid } from '../../helpers/custom-validators/accounts' |
4 | import { logger } from '../../helpers/logger' | ||
5 | import { areValidationErrors, doesAccountNameWithHostExist, doesLocalAccountNameExist } from './shared' | 4 | import { areValidationErrors, doesAccountNameWithHostExist, doesLocalAccountNameExist } from './shared' |
6 | 5 | ||
7 | const localAccountValidator = [ | 6 | const localAccountValidator = [ |
@@ -9,8 +8,6 @@ const localAccountValidator = [ | |||
9 | .custom(isAccountNameValid), | 8 | .custom(isAccountNameValid), |
10 | 9 | ||
11 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 10 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
12 | logger.debug('Checking localAccountValidator parameters', { parameters: req.params }) | ||
13 | |||
14 | if (areValidationErrors(req, res)) return | 11 | if (areValidationErrors(req, res)) return |
15 | if (!await doesLocalAccountNameExist(req.params.name, res)) return | 12 | if (!await doesLocalAccountNameExist(req.params.name, res)) return |
16 | 13 | ||
@@ -23,8 +20,6 @@ const accountNameWithHostGetValidator = [ | |||
23 | .exists(), | 20 | .exists(), |
24 | 21 | ||
25 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 22 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
26 | logger.debug('Checking accountsNameWithHostGetValidator parameters', { parameters: req.params }) | ||
27 | |||
28 | if (areValidationErrors(req, res)) return | 23 | if (areValidationErrors(req, res)) return |
29 | if (!await doesAccountNameWithHostExist(req.params.accountName, res)) return | 24 | if (!await doesAccountNameWithHostExist(req.params.accountName, res)) return |
30 | 25 | ||