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.ts5
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 @@
1import express from 'express' 1import express from 'express'
2import { param } from 'express-validator' 2import { param } from 'express-validator'
3import { isAccountNameValid } from '../../helpers/custom-validators/accounts' 3import { isAccountNameValid } from '../../helpers/custom-validators/accounts'
4import { logger } from '../../helpers/logger'
5import { areValidationErrors, doesAccountNameWithHostExist, doesLocalAccountNameExist } from './shared' 4import { areValidationErrors, doesAccountNameWithHostExist, doesLocalAccountNameExist } from './shared'
6 5
7const localAccountValidator = [ 6const 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