diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-03 11:36:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-03 11:36:03 +0100 |
commit | e8e122002d5a6a2bedcf3d66d35657c9b9e1ebaf (patch) | |
tree | c29952bef32c5e95c9409724f12d902dcdd8d39e /server/middlewares | |
parent | 01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea (diff) | |
download | PeerTube-e8e122002d5a6a2bedcf3d66d35657c9b9e1ebaf.tar.gz PeerTube-e8e122002d5a6a2bedcf3d66d35657c9b9e1ebaf.tar.zst PeerTube-e8e122002d5a6a2bedcf3d66d35657c9b9e1ebaf.zip |
Automatically resize avatars
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/validators/users.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 7de3e442c..d22a745b4 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -12,7 +12,6 @@ import { isSignupAllowed } from '../../helpers/utils' | |||
12 | import { CONSTRAINTS_FIELDS } from '../../initializers' | 12 | import { CONSTRAINTS_FIELDS } from '../../initializers' |
13 | import { UserModel } from '../../models/account/user' | 13 | import { UserModel } from '../../models/account/user' |
14 | import { areValidationErrors } from './utils' | 14 | import { areValidationErrors } from './utils' |
15 | import Multer = require('multer') | ||
16 | 15 | ||
17 | const usersAddValidator = [ | 16 | const usersAddValidator = [ |
18 | body('username').custom(isUserUsernameValid).withMessage('Should have a valid username (lowercase alphanumeric characters)'), | 17 | body('username').custom(isUserUsernameValid).withMessage('Should have a valid username (lowercase alphanumeric characters)'), |
@@ -105,7 +104,7 @@ const usersUpdateMyAvatarValidator = [ | |||
105 | ), | 104 | ), |
106 | 105 | ||
107 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 106 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
108 | logger.debug('Checking usersUpdateMyAvatarValidator parameters', { parameters: req.body }) | 107 | logger.debug('Checking usersUpdateMyAvatarValidator parameters', { files: req.files }) |
109 | 108 | ||
110 | if (areValidationErrors(req, res)) return | 109 | if (areValidationErrors(req, res)) return |
111 | 110 | ||