diff options
Diffstat (limited to 'server/middlewares/validators/videos/video-channels.ts')
-rw-r--r-- | server/middlewares/validators/videos/video-channels.ts | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/server/middlewares/validators/videos/video-channels.ts b/server/middlewares/validators/videos/video-channels.ts index ad1415691..8338b24fc 100644 --- a/server/middlewares/validators/videos/video-channels.ts +++ b/server/middlewares/validators/videos/video-channels.ts | |||
@@ -12,7 +12,6 @@ import { | |||
12 | isVideoChannelSupportValid, | 12 | isVideoChannelSupportValid, |
13 | isVideoChannelUsernameValid | 13 | isVideoChannelUsernameValid |
14 | } from '../../../helpers/custom-validators/video-channels' | 14 | } from '../../../helpers/custom-validators/video-channels' |
15 | import { logger } from '../../../helpers/logger' | ||
16 | import { ActorModel } from '../../../models/actor/actor' | 15 | import { ActorModel } from '../../../models/actor/actor' |
17 | import { VideoChannelModel } from '../../../models/video/video-channel' | 16 | import { VideoChannelModel } from '../../../models/video/video-channel' |
18 | import { areValidationErrors, checkUserQuota, doesVideoChannelNameWithHostExist } from '../shared' | 17 | import { areValidationErrors, checkUserQuota, doesVideoChannelNameWithHostExist } from '../shared' |
@@ -31,8 +30,6 @@ export const videoChannelsAddValidator = [ | |||
31 | .custom(isVideoChannelSupportValid), | 30 | .custom(isVideoChannelSupportValid), |
32 | 31 | ||
33 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 32 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
34 | logger.debug('Checking videoChannelsAdd parameters', { parameters: req.body }) | ||
35 | |||
36 | if (areValidationErrors(req, res)) return | 33 | if (areValidationErrors(req, res)) return |
37 | 34 | ||
38 | const actor = await ActorModel.loadLocalByName(req.body.name) | 35 | const actor = await ActorModel.loadLocalByName(req.body.name) |
@@ -72,8 +69,6 @@ export const videoChannelsUpdateValidator = [ | |||
72 | .custom(isBooleanValid).withMessage('Should have a valid bulkVideosSupportUpdate boolean field'), | 69 | .custom(isBooleanValid).withMessage('Should have a valid bulkVideosSupportUpdate boolean field'), |
73 | 70 | ||
74 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 71 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
75 | logger.debug('Checking videoChannelsUpdate parameters', { parameters: req.body }) | ||
76 | |||
77 | if (areValidationErrors(req, res)) return | 72 | if (areValidationErrors(req, res)) return |
78 | 73 | ||
79 | return next() | 74 | return next() |
@@ -82,8 +77,6 @@ export const videoChannelsUpdateValidator = [ | |||
82 | 77 | ||
83 | export const videoChannelsRemoveValidator = [ | 78 | export const videoChannelsRemoveValidator = [ |
84 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 79 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
85 | logger.debug('Checking videoChannelsRemove parameters', { parameters: req.params }) | ||
86 | |||
87 | if (!await checkVideoChannelIsNotTheLastOne(res.locals.videoChannel, res)) return | 80 | if (!await checkVideoChannelIsNotTheLastOne(res.locals.videoChannel, res)) return |
88 | 81 | ||
89 | return next() | 82 | return next() |
@@ -95,8 +88,6 @@ export const videoChannelsNameWithHostValidator = [ | |||
95 | .exists(), | 88 | .exists(), |
96 | 89 | ||
97 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 90 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
98 | logger.debug('Checking videoChannelsNameWithHostValidator parameters', { parameters: req.params }) | ||
99 | |||
100 | if (areValidationErrors(req, res)) return | 91 | if (areValidationErrors(req, res)) return |
101 | 92 | ||
102 | if (!await doesVideoChannelNameWithHostExist(req.params.nameWithHost, res)) return | 93 | if (!await doesVideoChannelNameWithHostExist(req.params.nameWithHost, res)) return |
@@ -147,8 +138,6 @@ export const videoChannelsListValidator = [ | |||
147 | .not().isEmpty(), | 138 | .not().isEmpty(), |
148 | 139 | ||
149 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 140 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
150 | logger.debug('Checking video channels search query', { parameters: req.query }) | ||
151 | |||
152 | if (areValidationErrors(req, res)) return | 141 | if (areValidationErrors(req, res)) return |
153 | 142 | ||
154 | return next() | 143 | return next() |
@@ -164,8 +153,6 @@ export const videoChannelImportVideosValidator = [ | |||
164 | .custom(isIdValid), | 153 | .custom(isIdValid), |
165 | 154 | ||
166 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 155 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
167 | logger.debug('Checking videoChannelImport parameters', { parameters: req.body }) | ||
168 | |||
169 | if (areValidationErrors(req, res)) return | 156 | if (areValidationErrors(req, res)) return |
170 | 157 | ||
171 | const body: VideosImportInChannelCreate = req.body | 158 | const body: VideosImportInChannelCreate = req.body |