aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-09 11:06:13 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-09 11:17:36 +0200
commit14d3270f363245d2c83fcc2ac109e39743b5627e (patch)
tree22a1d40675d372d53c35a4d7adf1fc1b4ceb1799 /server/helpers/custom-validators/videos.ts
parentaa8b6df4a51c82eb91e6fd71a090b2128098af6b (diff)
downloadPeerTube-14d3270f363245d2c83fcc2ac109e39743b5627e.tar.gz
PeerTube-14d3270f363245d2c83fcc2ac109e39743b5627e.tar.zst
PeerTube-14d3270f363245d2c83fcc2ac109e39743b5627e.zip
Change how we handle resolution
It was an enum before, now we just use video height
Diffstat (limited to 'server/helpers/custom-validators/videos.ts')
-rw-r--r--server/helpers/custom-validators/videos.ts5
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'
14import { isUserUsernameValid } from './users' 13import { isUserUsernameValid } from './users'
15import { isArray, exists } from './misc' 14import { isArray, exists } from './misc'
@@ -128,7 +127,7 @@ function isVideoFileSizeValid (value: string) {
128} 127}
129 128
130function isVideoFileResolutionValid (value: string) { 129function isVideoFileResolutionValid (value: string) {
131 return VIDEO_FILE_RESOLUTIONS[value] !== undefined 130 return exists(value) && validator.isInt(value + '')
132} 131}
133 132
134function isVideoFileExtnameValid (value: string) { 133function isVideoFileExtnameValid (value: string) {