diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-07-11 16:01:56 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-07-11 16:01:56 +0200 |
commit | 0a6658fdcbd779ada8f3758048c326e997902d5a (patch) | |
tree | 5de40bf901db0299011104b1344783637b964eb0 /server/helpers/custom-validators/remote | |
parent | e6d4b0ff2404dcf0b3a755c3fcc415ffeb6e754d (diff) | |
download | PeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.tar.gz PeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.tar.zst PeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.zip |
Use global uuid instead of remoteId for videos
Diffstat (limited to 'server/helpers/custom-validators/remote')
-rw-r--r-- | server/helpers/custom-validators/remote/videos.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/helpers/custom-validators/remote/videos.ts b/server/helpers/custom-validators/remote/videos.ts index 1df7316aa..e14673cb3 100644 --- a/server/helpers/custom-validators/remote/videos.ts +++ b/server/helpers/custom-validators/remote/videos.ts | |||
@@ -9,7 +9,7 @@ import { isArray } from '../misc' | |||
9 | import { | 9 | import { |
10 | isVideoAuthorValid, | 10 | isVideoAuthorValid, |
11 | isVideoThumbnailDataValid, | 11 | isVideoThumbnailDataValid, |
12 | isVideoRemoteIdValid, | 12 | isVideoUUIDValid, |
13 | isVideoAbuseReasonValid, | 13 | isVideoAbuseReasonValid, |
14 | isVideoAbuseReporterUsernameValid, | 14 | isVideoAbuseReporterUsernameValid, |
15 | isVideoViewsValid, | 15 | isVideoViewsValid, |
@@ -50,11 +50,11 @@ function isEachRemoteRequestVideosValid (requests: any[]) { | |||
50 | ) || | 50 | ) || |
51 | ( | 51 | ( |
52 | isRequestTypeRemoveValid(request.type) && | 52 | isRequestTypeRemoveValid(request.type) && |
53 | isVideoRemoteIdValid(video.remoteId) | 53 | isVideoUUIDValid(video.uuid) |
54 | ) || | 54 | ) || |
55 | ( | 55 | ( |
56 | isRequestTypeReportAbuseValid(request.type) && | 56 | isRequestTypeReportAbuseValid(request.type) && |
57 | isVideoRemoteIdValid(request.data.videoRemoteId) && | 57 | isVideoUUIDValid(request.data.videoUUID) && |
58 | isVideoAbuseReasonValid(request.data.reportReason) && | 58 | isVideoAbuseReasonValid(request.data.reportReason) && |
59 | isVideoAbuseReporterUsernameValid(request.data.reporterUsername) | 59 | isVideoAbuseReporterUsernameValid(request.data.reporterUsername) |
60 | ) | 60 | ) |
@@ -69,7 +69,7 @@ function isEachRemoteRequestVideosQaduValid (requests: any[]) { | |||
69 | if (!video) return false | 69 | if (!video) return false |
70 | 70 | ||
71 | return ( | 71 | return ( |
72 | isVideoRemoteIdValid(video.remoteId) && | 72 | isVideoUUIDValid(video.uuid) && |
73 | (has(video, 'views') === false || isVideoViewsValid(video.views)) && | 73 | (has(video, 'views') === false || isVideoViewsValid(video.views)) && |
74 | (has(video, 'likes') === false || isVideoLikesValid(video.likes)) && | 74 | (has(video, 'likes') === false || isVideoLikesValid(video.likes)) && |
75 | (has(video, 'dislikes') === false || isVideoDislikesValid(video.dislikes)) | 75 | (has(video, 'dislikes') === false || isVideoDislikesValid(video.dislikes)) |
@@ -85,7 +85,7 @@ function isEachRemoteRequestVideosEventsValid (requests: any[]) { | |||
85 | if (!eventData) return false | 85 | if (!eventData) return false |
86 | 86 | ||
87 | return ( | 87 | return ( |
88 | isVideoRemoteIdValid(eventData.remoteId) && | 88 | isVideoUUIDValid(eventData.uuid) && |
89 | values(REQUEST_VIDEO_EVENT_TYPES).indexOf(eventData.eventType) !== -1 && | 89 | values(REQUEST_VIDEO_EVENT_TYPES).indexOf(eventData.eventType) !== -1 && |
90 | isVideoEventCountValid(eventData.count) | 90 | isVideoEventCountValid(eventData.count) |
91 | ) | 91 | ) |
@@ -124,7 +124,7 @@ function isCommonVideoAttributesValid (video: any) { | |||
124 | isVideoInfoHashValid(video.infoHash) && | 124 | isVideoInfoHashValid(video.infoHash) && |
125 | isVideoNameValid(video.name) && | 125 | isVideoNameValid(video.name) && |
126 | isVideoTagsValid(video.tags) && | 126 | isVideoTagsValid(video.tags) && |
127 | isVideoRemoteIdValid(video.remoteId) && | 127 | isVideoUUIDValid(video.uuid) && |
128 | isVideoExtnameValid(video.extname) && | 128 | isVideoExtnameValid(video.extname) && |
129 | isVideoViewsValid(video.views) && | 129 | isVideoViewsValid(video.views) && |
130 | isVideoLikesValid(video.likes) && | 130 | isVideoLikesValid(video.likes) && |