aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/redundancy.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 14:58:40 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 14:58:40 +0200
commita85d530384761a0af833caac9b38b9834517c9fa (patch)
tree5407dbcc32b6324067632d4c99f25a6b7d851230 /server/middlewares/validators/redundancy.ts
parent2ec349aa857b0bd8f26de5cd78981d60c9b98a69 (diff)
downloadPeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.gz
PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.zst
PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.zip
Remove unnecessary logs
Diffstat (limited to 'server/middlewares/validators/redundancy.ts')
-rw-r--r--server/middlewares/validators/redundancy.ts13
1 files changed, 0 insertions, 13 deletions
diff --git a/server/middlewares/validators/redundancy.ts b/server/middlewares/validators/redundancy.ts
index a74772bd1..79460f63c 100644
--- a/server/middlewares/validators/redundancy.ts
+++ b/server/middlewares/validators/redundancy.ts
@@ -12,7 +12,6 @@ import {
12 toIntOrNull 12 toIntOrNull
13} from '../../helpers/custom-validators/misc' 13} from '../../helpers/custom-validators/misc'
14import { isHostValid } from '../../helpers/custom-validators/servers' 14import { isHostValid } from '../../helpers/custom-validators/servers'
15import { logger } from '../../helpers/logger'
16import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' 15import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy'
17import { ServerModel } from '../../models/server/server' 16import { ServerModel } from '../../models/server/server'
18import { areValidationErrors, doesVideoExist, isValidVideoIdParam } from './shared' 17import { areValidationErrors, doesVideoExist, isValidVideoIdParam } from './shared'
@@ -29,8 +28,6 @@ const videoFileRedundancyGetValidator = [
29 .custom(exists), 28 .custom(exists),
30 29
31 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 30 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
32 logger.debug('Checking videoFileRedundancyGetValidator parameters', { parameters: req.params })
33
34 if (areValidationErrors(req, res)) return 31 if (areValidationErrors(req, res)) return
35 if (!await doesVideoExist(req.params.videoId, res)) return 32 if (!await doesVideoExist(req.params.videoId, res)) return
36 33
@@ -72,8 +69,6 @@ const videoPlaylistRedundancyGetValidator = [
72 .custom(exists), 69 .custom(exists),
73 70
74 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 71 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
75 logger.debug('Checking videoPlaylistRedundancyGetValidator parameters', { parameters: req.params })
76
77 if (areValidationErrors(req, res)) return 72 if (areValidationErrors(req, res)) return
78 if (!await doesVideoExist(req.params.videoId, res)) return 73 if (!await doesVideoExist(req.params.videoId, res)) return
79 74
@@ -112,8 +107,6 @@ const updateServerRedundancyValidator = [
112 .custom(isBooleanValid).withMessage('Should have a valid redundancyAllowed boolean'), 107 .custom(isBooleanValid).withMessage('Should have a valid redundancyAllowed boolean'),
113 108
114 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 109 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
115 logger.debug('Checking updateServerRedundancy parameters', { parameters: req.params })
116
117 if (areValidationErrors(req, res)) return 110 if (areValidationErrors(req, res)) return
118 111
119 const server = await ServerModel.loadByHost(req.params.host) 112 const server = await ServerModel.loadByHost(req.params.host)
@@ -135,8 +128,6 @@ const listVideoRedundanciesValidator = [
135 .custom(isVideoRedundancyTarget), 128 .custom(isVideoRedundancyTarget),
136 129
137 (req: express.Request, res: express.Response, next: express.NextFunction) => { 130 (req: express.Request, res: express.Response, next: express.NextFunction) => {
138 logger.debug('Checking listVideoRedundanciesValidator parameters', { parameters: req.query })
139
140 if (areValidationErrors(req, res)) return 131 if (areValidationErrors(req, res)) return
141 132
142 return next() 133 return next()
@@ -149,8 +140,6 @@ const addVideoRedundancyValidator = [
149 .custom(isIdOrUUIDValid), 140 .custom(isIdOrUUIDValid),
150 141
151 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 142 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
152 logger.debug('Checking addVideoRedundancyValidator parameters', { parameters: req.query })
153
154 if (areValidationErrors(req, res)) return 143 if (areValidationErrors(req, res)) return
155 144
156 if (!await doesVideoExist(req.body.videoId, res, 'only-video')) return 145 if (!await doesVideoExist(req.body.videoId, res, 'only-video')) return
@@ -180,8 +169,6 @@ const removeVideoRedundancyValidator = [
180 .custom(isIdValid), 169 .custom(isIdValid),
181 170
182 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 171 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
183 logger.debug('Checking removeVideoRedundancyValidator parameters', { parameters: req.query })
184
185 if (areValidationErrors(req, res)) return 172 if (areValidationErrors(req, res)) return
186 173
187 const redundancy = await VideoRedundancyModel.loadByIdWithVideo(parseInt(req.params.redundancyId, 10)) 174 const redundancy = await VideoRedundancyModel.loadByIdWithVideo(parseInt(req.params.redundancyId, 10))