From 1f256e7d3cf056c2d999260155cdba58ae1b878b Mon Sep 17 00:00:00 2001 From: Poslovitch Date: Sat, 24 Apr 2021 09:57:01 +0000 Subject: Implemented configurable minimum signup age Implements https://github.com/Chocobozzz/PeerTube/issues/3612 Fixed lint and removed debug Fixed another lint error Apply suggestions from code review Co-authored-by: Chocobozzz Add tests for min signup age config --- server/middlewares/validators/config.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'server/middlewares/validators/config.ts') diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.ts index a85883b19..e3e0c2058 100644 --- a/server/middlewares/validators/config.ts +++ b/server/middlewares/validators/config.ts @@ -30,6 +30,7 @@ const customConfigUpdateValidator = [ body('signup.enabled').isBoolean().withMessage('Should have a valid signup enabled boolean'), body('signup.limit').isInt().withMessage('Should have a valid signup limit'), body('signup.requiresEmailVerification').isBoolean().withMessage('Should have a valid requiresEmailVerification boolean'), + body('signup.minimumAge').isInt().withMessage("Should have a valid minimum age required"), body('admin.email').isEmail().withMessage('Should have a valid administrator email'), body('contactForm.enabled').isBoolean().withMessage('Should have a valid contact form enabled boolean'), -- cgit v1.2.3