diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-12-30 11:27:42 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-12-30 11:27:42 +0100 |
commit | 3d118fb501f576a298f6bb059167e4c7f4dd8dcc (patch) | |
tree | f2c8e74e1ca9a9d39b86412a6444a95343d2833e /server/helpers | |
parent | 7b1f49de22c40ae121ddb3c399b2540ba56fd414 (diff) | |
download | PeerTube-3d118fb501f576a298f6bb059167e4c7f4dd8dcc.tar.gz PeerTube-3d118fb501f576a298f6bb059167e4c7f4dd8dcc.tar.zst PeerTube-3d118fb501f576a298f6bb059167e4c7f4dd8dcc.zip |
Server: propagate video update to other pods
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/custom-validators/videos.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/videos.js b/server/helpers/custom-validators/videos.js index 4aaa6aaa9..b76eec1b5 100644 --- a/server/helpers/custom-validators/videos.js +++ b/server/helpers/custom-validators/videos.js | |||
@@ -38,6 +38,17 @@ function isEachRemoteVideosValid (requests) { | |||
38 | isVideoExtnameValid(video.extname) | 38 | isVideoExtnameValid(video.extname) |
39 | ) || | 39 | ) || |
40 | ( | 40 | ( |
41 | isRequestTypeUpdateValid(request.type) && | ||
42 | isVideoDateValid(video.createdAt) && | ||
43 | isVideoDescriptionValid(video.description) && | ||
44 | isVideoDurationValid(video.duration) && | ||
45 | isVideoInfoHashValid(video.infoHash) && | ||
46 | isVideoNameValid(video.name) && | ||
47 | isVideoTagsValid(video.tags) && | ||
48 | isVideoRemoteIdValid(video.remoteId) && | ||
49 | isVideoExtnameValid(video.extname) | ||
50 | ) || | ||
51 | ( | ||
41 | isRequestTypeRemoveValid(request.type) && | 52 | isRequestTypeRemoveValid(request.type) && |
42 | isVideoNameValid(video.name) && | 53 | isVideoNameValid(video.name) && |
43 | isVideoRemoteIdValid(video.remoteId) | 54 | isVideoRemoteIdValid(video.remoteId) |
@@ -104,6 +115,10 @@ function isRequestTypeAddValid (value) { | |||
104 | return value === 'add' | 115 | return value === 'add' |
105 | } | 116 | } |
106 | 117 | ||
118 | function isRequestTypeUpdateValid (value) { | ||
119 | return value === 'update' | ||
120 | } | ||
121 | |||
107 | function isRequestTypeRemoveValid (value) { | 122 | function isRequestTypeRemoveValid (value) { |
108 | return value === 'remove' | 123 | return value === 'remove' |
109 | } | 124 | } |