diff options
Diffstat (limited to 'server/helpers/custom-validators/videos.ts')
-rw-r--r-- | server/helpers/custom-validators/videos.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts index 2eb021ae7..a31aca019 100644 --- a/server/helpers/custom-validators/videos.ts +++ b/server/helpers/custom-validators/videos.ts | |||
@@ -8,8 +8,7 @@ import { | |||
8 | VIDEO_CATEGORIES, | 8 | VIDEO_CATEGORIES, |
9 | VIDEO_LICENCES, | 9 | VIDEO_LICENCES, |
10 | VIDEO_LANGUAGES, | 10 | VIDEO_LANGUAGES, |
11 | VIDEO_RATE_TYPES, | 11 | VIDEO_RATE_TYPES |
12 | VIDEO_FILE_RESOLUTIONS | ||
13 | } from '../../initializers' | 12 | } from '../../initializers' |
14 | import { isUserUsernameValid } from './users' | 13 | import { isUserUsernameValid } from './users' |
15 | import { isArray, exists } from './misc' | 14 | import { isArray, exists } from './misc' |
@@ -128,7 +127,7 @@ function isVideoFileSizeValid (value: string) { | |||
128 | } | 127 | } |
129 | 128 | ||
130 | function isVideoFileResolutionValid (value: string) { | 129 | function isVideoFileResolutionValid (value: string) { |
131 | return VIDEO_FILE_RESOLUTIONS[value] !== undefined | 130 | return exists(value) && validator.isInt(value + '') |
132 | } | 131 | } |
133 | 132 | ||
134 | function isVideoFileExtnameValid (value: string) { | 133 | function isVideoFileExtnameValid (value: string) { |