]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/users.ts
enable email verification by admin (#1348)
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / users.ts
index 61297120ac80de42caaeff795f2c67f5dd05dc50..ccaf2eeb6f24bfe59f809ea77d3a0220f7fa7d64 100644 (file)
@@ -114,6 +114,7 @@ const deleteMeValidator = [
 const usersUpdateValidator = [
   param('id').isInt().not().isEmpty().withMessage('Should have a valid id'),
   body('email').optional().isEmail().withMessage('Should have a valid email attribute'),
+  body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'),
   body('videoQuota').optional().custom(isUserVideoQuotaValid).withMessage('Should have a valid user quota'),
   body('videoQuotaDaily').optional().custom(isUserVideoQuotaDailyValid).withMessage('Should have a valid daily user quota'),
   body('role').optional().custom(isUserRoleValid).withMessage('Should have a valid role'),