aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators/videos.ts')
-rw-r--r--server/helpers/custom-validators/videos.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index 8904975c0..72d226e81 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -11,6 +11,7 @@ import {
11} from '../../initializers' 11} from '../../initializers'
12import { isUserUsernameValid } from './users' 12import { isUserUsernameValid } from './users'
13import { isArray, exists } from './misc' 13import { isArray, exists } from './misc'
14import { VideoRateType } from '../../../shared'
14 15
15const VIDEOS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEOS 16const VIDEOS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEOS
16const VIDEO_ABUSES_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_ABUSES 17const VIDEO_ABUSES_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_ABUSES
@@ -105,7 +106,7 @@ function isVideoEventCountValid (value: string) {
105} 106}
106 107
107function isVideoRatingTypeValid (value: string) { 108function isVideoRatingTypeValid (value: string) {
108 return values(VIDEO_RATE_TYPES).indexOf(value) !== -1 109 return values(VIDEO_RATE_TYPES).indexOf(value as VideoRateType) !== -1
109} 110}
110 111
111function isVideoFile (value: string, files: { [ fieldname: string ]: Express.Multer.File[] }) { 112function isVideoFile (value: string, files: { [ fieldname: string ]: Express.Multer.File[] }) {