From 2b65c4e53511ccb85b17479cb1c62717afb8511c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 25 Jul 2019 17:28:45 +0200 Subject: Fix scheduled privacy and verify email validations --- server/middlewares/validators/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/middlewares/validators/users.ts') diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index db03dc231..da92c715d 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts @@ -2,7 +2,7 @@ import * as Bluebird from 'bluebird' import * as express from 'express' import { body, param } from 'express-validator' import { omit } from 'lodash' -import { isIdOrUUIDValid, toIntOrNull } from '../../helpers/custom-validators/misc' +import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc' import { isUserAdminFlagsValid, isUserAutoPlayVideoValid, @@ -357,7 +357,7 @@ const usersVerifyEmailValidator = [ .not().isEmpty().withMessage('Should have a valid verification string'), body('isPendingEmail') .optional() - .customSanitizer(toIntOrNull), + .customSanitizer(toBooleanOrNull), async (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking usersVerifyEmail parameters', { parameters: req.params }) -- cgit v1.2.3