diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:27:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:27:04 +0200 |
commit | 396f6f0140b0f76162e2378fd5a61e2f888673ed (patch) | |
tree | a5bd668bfc7dca7f311b9fc42ebb8bd01f462648 /server/middlewares/validators/themes.ts | |
parent | 97eba003a9d0adcb0cab9190f566327b1417c7d3 (diff) | |
download | PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.tar.gz PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.tar.zst PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.zip |
Cleanup useless express validator messages
Diffstat (limited to 'server/middlewares/validators/themes.ts')
-rw-r--r-- | server/middlewares/validators/themes.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/middlewares/validators/themes.ts b/server/middlewares/validators/themes.ts index 7b9fee858..f6a8c2d92 100644 --- a/server/middlewares/validators/themes.ts +++ b/server/middlewares/validators/themes.ts | |||
@@ -8,9 +8,12 @@ import { PluginManager } from '../../lib/plugins/plugin-manager' | |||
8 | import { areValidationErrors } from './shared' | 8 | import { areValidationErrors } from './shared' |
9 | 9 | ||
10 | const serveThemeCSSValidator = [ | 10 | const serveThemeCSSValidator = [ |
11 | param('themeName').custom(isPluginNameValid).withMessage('Should have a valid theme name'), | 11 | param('themeName') |
12 | param('themeVersion').custom(isPluginVersionValid).withMessage('Should have a valid theme version'), | 12 | .custom(isPluginNameValid), |
13 | param('staticEndpoint').custom(isSafePath).withMessage('Should have a valid static endpoint'), | 13 | param('themeVersion') |
14 | .custom(isPluginVersionValid), | ||
15 | param('staticEndpoint') | ||
16 | .custom(isSafePath), | ||
14 | 17 | ||
15 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 18 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
16 | logger.debug('Checking serveThemeCSS parameters', { parameters: req.params }) | 19 | logger.debug('Checking serveThemeCSS parameters', { parameters: req.params }) |