aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/videos.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/custom-validators/videos.js b/server/helpers/custom-validators/videos.js
index c4c59808f..166158ef3 100644
--- a/server/helpers/custom-validators/videos.js
+++ b/server/helpers/custom-validators/videos.js
@@ -13,7 +13,7 @@ const videosValidators = {
13 isVideoDateValid, 13 isVideoDateValid,
14 isVideoDescriptionValid, 14 isVideoDescriptionValid,
15 isVideoDurationValid, 15 isVideoDurationValid,
16 isVideoMagnetUriValid, 16 isVideoMagnetValid,
17 isVideoNameValid, 17 isVideoNameValid,
18 isVideoPodUrlValid, 18 isVideoPodUrlValid,
19 isVideoTagsValid, 19 isVideoTagsValid,
@@ -31,7 +31,7 @@ function isEachRemoteVideosValid (requests) {
31 isVideoDateValid(video.createdDate) && 31 isVideoDateValid(video.createdDate) &&
32 isVideoDescriptionValid(video.description) && 32 isVideoDescriptionValid(video.description) &&
33 isVideoDurationValid(video.duration) && 33 isVideoDurationValid(video.duration) &&
34 isVideoMagnetUriValid(video.magnetUri) && 34 isVideoMagnetValid(video.magnetUri) &&
35 isVideoNameValid(video.name) && 35 isVideoNameValid(video.name) &&
36 isVideoPodUrlValid(video.podUrl) && 36 isVideoPodUrlValid(video.podUrl) &&
37 isVideoTagsValid(video.tags) && 37 isVideoTagsValid(video.tags) &&
@@ -62,8 +62,8 @@ function isVideoDurationValid (value) {
62 return validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.DURATION) 62 return validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.DURATION)
63} 63}
64 64
65function isVideoMagnetUriValid (value) { 65function isVideoMagnetValid (value) {
66 return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.MAGNET_URI) 66 return validator.isLength(value.infoHash, VIDEOS_CONSTRAINTS_FIELDS.MAGNET.XT)
67} 67}
68 68
69function isVideoNameValid (value) { 69function isVideoNameValid (value) {