diff options
Diffstat (limited to 'server/middlewares/validators/server.ts')
-rw-r--r-- | server/middlewares/validators/server.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/middlewares/validators/server.ts b/server/middlewares/validators/server.ts index 2b34c4a76..fc7239b25 100644 --- a/server/middlewares/validators/server.ts +++ b/server/middlewares/validators/server.ts | |||
@@ -1,13 +1,13 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { logger } from '../../helpers/logger' | ||
3 | import { areValidationErrors } from './utils' | ||
4 | import { isHostValid, isValidContactBody } from '../../helpers/custom-validators/servers' | ||
5 | import { ServerModel } from '../../models/server/server' | ||
6 | import { body } from 'express-validator' | 2 | import { body } from 'express-validator' |
3 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
4 | import { isHostValid, isValidContactBody } from '../../helpers/custom-validators/servers' | ||
7 | import { isUserDisplayNameValid } from '../../helpers/custom-validators/users' | 5 | import { isUserDisplayNameValid } from '../../helpers/custom-validators/users' |
8 | import { Redis } from '../../lib/redis' | 6 | import { logger } from '../../helpers/logger' |
9 | import { CONFIG, isEmailEnabled } from '../../initializers/config' | 7 | import { CONFIG, isEmailEnabled } from '../../initializers/config' |
10 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | 8 | import { Redis } from '../../lib/redis' |
9 | import { ServerModel } from '../../models/server/server' | ||
10 | import { areValidationErrors } from './shared' | ||
11 | 11 | ||
12 | const serverGetValidator = [ | 12 | const serverGetValidator = [ |
13 | body('host').custom(isHostValid).withMessage('Should have a valid host'), | 13 | body('host').custom(isHostValid).withMessage('Should have a valid host'), |