]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/videos.js
Server: use preview image for opengraph
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / videos.js
index 166158ef3700b13906ff3d7592c4817037384069..45acb7686de1e463d90891a0e4ce829b80983b3c 100644 (file)
@@ -31,7 +31,7 @@ function isEachRemoteVideosValid (requests) {
         isVideoDateValid(video.createdDate) &&
         isVideoDescriptionValid(video.description) &&
         isVideoDurationValid(video.duration) &&
-        isVideoMagnetValid(video.magnetUri) &&
+        isVideoMagnetValid(video.magnet) &&
         isVideoNameValid(video.name) &&
         isVideoPodUrlValid(video.podUrl) &&
         isVideoTagsValid(video.tags) &&
@@ -63,7 +63,7 @@ function isVideoDurationValid (value) {
 }
 
 function isVideoMagnetValid (value) {
-  return validator.isLength(value.infoHash, VIDEOS_CONSTRAINTS_FIELDS.MAGNET.XT)
+  return validator.isLength(value.infoHash, VIDEOS_CONSTRAINTS_FIELDS.MAGNET.INFO_HASH)
 }
 
 function isVideoNameValid (value) {