diff options
author | Poslovitch <poslovitch@bentobox.world> | 2021-04-24 09:57:01 +0000 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-28 13:56:05 +0200 |
commit | 1f256e7d3cf056c2d999260155cdba58ae1b878b (patch) | |
tree | e33db698da50c329e1eea4122e190e6ef247d8e4 /server/middlewares | |
parent | f22e0e2c19b06edfc85429198f9e54a075f71ad3 (diff) | |
download | PeerTube-1f256e7d3cf056c2d999260155cdba58ae1b878b.tar.gz PeerTube-1f256e7d3cf056c2d999260155cdba58ae1b878b.tar.zst PeerTube-1f256e7d3cf056c2d999260155cdba58ae1b878b.zip |
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 <chocobozzz@cpy.re>
Add tests for min signup age config
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/validators/config.ts | 1 |
1 files changed, 1 insertions, 0 deletions
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 = [ | |||
30 | body('signup.enabled').isBoolean().withMessage('Should have a valid signup enabled boolean'), | 30 | body('signup.enabled').isBoolean().withMessage('Should have a valid signup enabled boolean'), |
31 | body('signup.limit').isInt().withMessage('Should have a valid signup limit'), | 31 | body('signup.limit').isInt().withMessage('Should have a valid signup limit'), |
32 | body('signup.requiresEmailVerification').isBoolean().withMessage('Should have a valid requiresEmailVerification boolean'), | 32 | body('signup.requiresEmailVerification').isBoolean().withMessage('Should have a valid requiresEmailVerification boolean'), |
33 | body('signup.minimumAge').isInt().withMessage("Should have a valid minimum age required"), | ||
33 | 34 | ||
34 | body('admin.email').isEmail().withMessage('Should have a valid administrator email'), | 35 | body('admin.email').isEmail().withMessage('Should have a valid administrator email'), |
35 | body('contactForm.enabled').isBoolean().withMessage('Should have a valid contact form enabled boolean'), | 36 | body('contactForm.enabled').isBoolean().withMessage('Should have a valid contact form enabled boolean'), |