From c1e5bd23d557976ba11f89c53a00c1657a7ea890 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 Sep 2019 10:19:55 +0200 Subject: Try to fix tests --- server/middlewares/validators/users.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server/middlewares') diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 871233afe..b3466333c 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts @@ -4,8 +4,10 @@ import { body, param } from 'express-validator' import { omit } from 'lodash' import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc' import { - isNoInstanceConfigWarningModal, isNoWelcomeModal, + isNoInstanceConfigWarningModal, + isNoWelcomeModal, isUserAdminFlagsValid, + isUserAutoPlayNextVideoValid, isUserAutoPlayVideoValid, isUserBlockedReasonValid, isUserDescriptionValid, @@ -223,6 +225,9 @@ const usersUpdateMeValidator = [ body('noWelcomeModal') .optional() .custom(v => isNoWelcomeModal(v)).withMessage('Should have a valid noWelcomeModal boolean'), + body('autoPlayNextVideo') + .optional() + .custom(v => isUserAutoPlayNextVideoValid(v)).withMessage('Should have a valid autoPlayNextVideo boolean'), async (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking usersUpdateMe parameters', { parameters: omit(req.body, 'password') }) -- cgit v1.2.3