diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-12-28 15:49:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-12-28 15:49:23 +0100 |
commit | 67bf9b96bbcd92b069fe86d9223fe0f8b9c6e677 (patch) | |
tree | bae6a9b0c3133c9cc38a2972222b5991f0cf614e /server/helpers/custom-validators/videos.js | |
parent | 552cc9d646e78edae8b0fe61564d4e49db0b6206 (diff) | |
download | PeerTube-67bf9b96bbcd92b069fe86d9223fe0f8b9c6e677.tar.gz PeerTube-67bf9b96bbcd92b069fe86d9223fe0f8b9c6e677.tar.zst PeerTube-67bf9b96bbcd92b069fe86d9223fe0f8b9c6e677.zip |
Server: add database field validations
Diffstat (limited to 'server/helpers/custom-validators/videos.js')
-rw-r--r-- | server/helpers/custom-validators/videos.js | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/server/helpers/custom-validators/videos.js b/server/helpers/custom-validators/videos.js index be8256a80..da857ba5f 100644 --- a/server/helpers/custom-validators/videos.js +++ b/server/helpers/custom-validators/videos.js | |||
@@ -15,7 +15,6 @@ const videosValidators = { | |||
15 | isVideoDurationValid, | 15 | isVideoDurationValid, |
16 | isVideoInfoHashValid, | 16 | isVideoInfoHashValid, |
17 | isVideoNameValid, | 17 | isVideoNameValid, |
18 | isVideoPodHostValid, | ||
19 | isVideoTagsValid, | 18 | isVideoTagsValid, |
20 | isVideoThumbnailValid, | 19 | isVideoThumbnailValid, |
21 | isVideoThumbnail64Valid | 20 | isVideoThumbnail64Valid |
@@ -74,11 +73,6 @@ function isVideoNameValid (value) { | |||
74 | return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.NAME) | 73 | return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.NAME) |
75 | } | 74 | } |
76 | 75 | ||
77 | function isVideoPodHostValid (value) { | ||
78 | // TODO: set options (TLD...) | ||
79 | return validator.isURL(value) | ||
80 | } | ||
81 | |||
82 | function isVideoTagsValid (tags) { | 76 | function isVideoTagsValid (tags) { |
83 | return miscValidators.isArray(tags) && | 77 | return miscValidators.isArray(tags) && |
84 | validator.isInt(tags.length, VIDEOS_CONSTRAINTS_FIELDS.TAGS) && | 78 | validator.isInt(tags.length, VIDEOS_CONSTRAINTS_FIELDS.TAGS) && |