aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/redundancy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/redundancy.ts')
-rw-r--r--server/middlewares/validators/redundancy.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/redundancy.ts b/server/middlewares/validators/redundancy.ts
index 329322509..419921928 100644
--- a/server/middlewares/validators/redundancy.ts
+++ b/server/middlewares/validators/redundancy.ts
@@ -2,7 +2,7 @@ import * as express from 'express'
2import 'express-validator' 2import 'express-validator'
3import { param, body } from 'express-validator/check' 3import { param, body } from 'express-validator/check'
4import { exists, isBooleanValid, isIdOrUUIDValid, toIntOrNull } from '../../helpers/custom-validators/misc' 4import { exists, isBooleanValid, isIdOrUUIDValid, toIntOrNull } from '../../helpers/custom-validators/misc'
5import { isVideoExist } from '../../helpers/custom-validators/videos' 5import { doesVideoExist } from '../../helpers/custom-validators/videos'
6import { logger } from '../../helpers/logger' 6import { logger } from '../../helpers/logger'
7import { areValidationErrors } from './utils' 7import { areValidationErrors } from './utils'
8import { VideoModel } from '../../models/video/video' 8import { VideoModel } from '../../models/video/video'
@@ -27,7 +27,7 @@ const videoFileRedundancyGetValidator = [
27 logger.debug('Checking videoFileRedundancyGetValidator parameters', { parameters: req.params }) 27 logger.debug('Checking videoFileRedundancyGetValidator parameters', { parameters: req.params })
28 28
29 if (areValidationErrors(req, res)) return 29 if (areValidationErrors(req, res)) return
30 if (!await isVideoExist(req.params.videoId, res)) return 30 if (!await doesVideoExist(req.params.videoId, res)) return
31 31
32 const video: VideoModel = res.locals.video 32 const video: VideoModel = res.locals.video
33 const videoFile = video.VideoFiles.find(f => { 33 const videoFile = video.VideoFiles.find(f => {
@@ -53,7 +53,7 @@ const videoPlaylistRedundancyGetValidator = [
53 logger.debug('Checking videoPlaylistRedundancyGetValidator parameters', { parameters: req.params }) 53 logger.debug('Checking videoPlaylistRedundancyGetValidator parameters', { parameters: req.params })
54 54
55 if (areValidationErrors(req, res)) return 55 if (areValidationErrors(req, res)) return
56 if (!await isVideoExist(req.params.videoId, res)) return 56 if (!await doesVideoExist(req.params.videoId, res)) return
57 57
58 const video: VideoModel = res.locals.video 58 const video: VideoModel = res.locals.video
59 const videoStreamingPlaylist = video.VideoStreamingPlaylists.find(p => p === req.params.streamingPlaylistType) 59 const videoStreamingPlaylist = video.VideoStreamingPlaylists.find(p => p === req.params.streamingPlaylistType)