aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-01-27 17:15:21 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-01-28 15:55:34 +0100
commitba5d4a849c7d7ba05f093480ae12286c4af61556 (patch)
tree704a80b96d3b437ad12feacaaaf58a96b97282a1 /server/middlewares/validators
parent3da68f0a781ebd893521e2e6fa200280c92ae815 (diff)
downloadPeerTube-ba5d4a849c7d7ba05f093480ae12286c4af61556.tar.gz
PeerTube-ba5d4a849c7d7ba05f093480ae12286c4af61556.tar.zst
PeerTube-ba5d4a849c7d7ba05f093480ae12286c4af61556.zip
move from trending routes to alg param
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/config.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.ts
index 0efe1157f..52c28799f 100644
--- a/server/middlewares/validators/config.ts
+++ b/server/middlewares/validators/config.ts
@@ -17,7 +17,6 @@ const customConfigUpdateValidator = [
17 body('instance.terms').exists().withMessage('Should have a valid instance terms'), 17 body('instance.terms').exists().withMessage('Should have a valid instance terms'),
18 body('instance.defaultNSFWPolicy').custom(isUserNSFWPolicyValid).withMessage('Should have a valid NSFW policy'), 18 body('instance.defaultNSFWPolicy').custom(isUserNSFWPolicyValid).withMessage('Should have a valid NSFW policy'),
19 body('instance.defaultClientRoute').exists().withMessage('Should have a valid instance default client route'), 19 body('instance.defaultClientRoute').exists().withMessage('Should have a valid instance default client route'),
20 body('instance.defaultTrendingRoute').exists().withMessage('Should have a valid instance default trending route'),
21 body('instance.customizations.css').exists().withMessage('Should have a valid instance CSS customization'), 20 body('instance.customizations.css').exists().withMessage('Should have a valid instance CSS customization'),
22 body('instance.customizations.javascript').exists().withMessage('Should have a valid instance JavaScript customization'), 21 body('instance.customizations.javascript').exists().withMessage('Should have a valid instance JavaScript customization'),
23 22
@@ -55,6 +54,9 @@ const customConfigUpdateValidator = [
55 body('import.videos.http.enabled').isBoolean().withMessage('Should have a valid import video http enabled boolean'), 54 body('import.videos.http.enabled').isBoolean().withMessage('Should have a valid import video http enabled boolean'),
56 body('import.videos.torrent.enabled').isBoolean().withMessage('Should have a valid import video torrent enabled boolean'), 55 body('import.videos.torrent.enabled').isBoolean().withMessage('Should have a valid import video torrent enabled boolean'),
57 56
57 body('trending.videos.algorithms.default').exists().withMessage('Should have a valid default trending algorithm'),
58 body('trending.videos.algorithms.enabled').exists().withMessage('Should have a valid array of enabled trending algorithms'),
59
58 body('followers.instance.enabled').isBoolean().withMessage('Should have a valid followers of instance boolean'), 60 body('followers.instance.enabled').isBoolean().withMessage('Should have a valid followers of instance boolean'),
59 body('followers.instance.manualApproval').isBoolean().withMessage('Should have a valid manual approval boolean'), 61 body('followers.instance.manualApproval').isBoolean().withMessage('Should have a valid manual approval boolean'),
60 62