aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/remote
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators/remote')
-rw-r--r--server/helpers/custom-validators/remote/videos.ts12
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'
9import { 9import {
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) &&