X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Faccount.ts;h=e529c831d541ea575e80209a8d6f3d623848dc00;hb=082d32eb8873190e48329b61b91f87d71f3cf812;hp=96e120a38506f9ba9a9a1289478a2a905ca71ff7;hpb=0f6acda11681de90d38dd18669863c6e270851ee;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/account.ts b/server/middlewares/validators/account.ts index 96e120a38..e529c831d 100644 --- a/server/middlewares/validators/account.ts +++ b/server/middlewares/validators/account.ts @@ -1,8 +1,8 @@ -import * as express from 'express' -import { param } from 'express-validator/check' -import { isAccountNameValid, doesAccountNameWithHostExist, doesLocalAccountNameExist } from '../../helpers/custom-validators/accounts' +import express from 'express' +import { param } from 'express-validator' +import { isAccountNameValid } from '../../helpers/custom-validators/accounts' import { logger } from '../../helpers/logger' -import { areValidationErrors } from './utils' +import { areValidationErrors, doesAccountNameWithHostExist, doesLocalAccountNameExist } from './shared' const localAccountValidator = [ param('name').custom(isAccountNameValid).withMessage('Should have a valid account name'),