From ba5d4a849c7d7ba05f093480ae12286c4af61556 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Wed, 27 Jan 2021 17:15:21 +0100 Subject: move from trending routes to alg param --- server/middlewares/validators/config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/middlewares/validators/config.ts') 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 = [ body('instance.terms').exists().withMessage('Should have a valid instance terms'), body('instance.defaultNSFWPolicy').custom(isUserNSFWPolicyValid).withMessage('Should have a valid NSFW policy'), body('instance.defaultClientRoute').exists().withMessage('Should have a valid instance default client route'), - body('instance.defaultTrendingRoute').exists().withMessage('Should have a valid instance default trending route'), body('instance.customizations.css').exists().withMessage('Should have a valid instance CSS customization'), body('instance.customizations.javascript').exists().withMessage('Should have a valid instance JavaScript customization'), @@ -55,6 +54,9 @@ const customConfigUpdateValidator = [ body('import.videos.http.enabled').isBoolean().withMessage('Should have a valid import video http enabled boolean'), body('import.videos.torrent.enabled').isBoolean().withMessage('Should have a valid import video torrent enabled boolean'), + body('trending.videos.algorithms.default').exists().withMessage('Should have a valid default trending algorithm'), + body('trending.videos.algorithms.enabled').exists().withMessage('Should have a valid array of enabled trending algorithms'), + body('followers.instance.enabled').isBoolean().withMessage('Should have a valid followers of instance boolean'), body('followers.instance.manualApproval').isBoolean().withMessage('Should have a valid manual approval boolean'), -- cgit v1.2.3