From 0a6658fdcbd779ada8f3758048c326e997902d5a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jul 2017 16:01:56 +0200 Subject: Use global uuid instead of remoteId for videos --- server/helpers/custom-validators/remote/videos.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server/helpers/custom-validators/remote') 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' import { isVideoAuthorValid, isVideoThumbnailDataValid, - isVideoRemoteIdValid, + isVideoUUIDValid, isVideoAbuseReasonValid, isVideoAbuseReporterUsernameValid, isVideoViewsValid, @@ -50,11 +50,11 @@ function isEachRemoteRequestVideosValid (requests: any[]) { ) || ( isRequestTypeRemoveValid(request.type) && - isVideoRemoteIdValid(video.remoteId) + isVideoUUIDValid(video.uuid) ) || ( isRequestTypeReportAbuseValid(request.type) && - isVideoRemoteIdValid(request.data.videoRemoteId) && + isVideoUUIDValid(request.data.videoUUID) && isVideoAbuseReasonValid(request.data.reportReason) && isVideoAbuseReporterUsernameValid(request.data.reporterUsername) ) @@ -69,7 +69,7 @@ function isEachRemoteRequestVideosQaduValid (requests: any[]) { if (!video) return false return ( - isVideoRemoteIdValid(video.remoteId) && + isVideoUUIDValid(video.uuid) && (has(video, 'views') === false || isVideoViewsValid(video.views)) && (has(video, 'likes') === false || isVideoLikesValid(video.likes)) && (has(video, 'dislikes') === false || isVideoDislikesValid(video.dislikes)) @@ -85,7 +85,7 @@ function isEachRemoteRequestVideosEventsValid (requests: any[]) { if (!eventData) return false return ( - isVideoRemoteIdValid(eventData.remoteId) && + isVideoUUIDValid(eventData.uuid) && values(REQUEST_VIDEO_EVENT_TYPES).indexOf(eventData.eventType) !== -1 && isVideoEventCountValid(eventData.count) ) @@ -124,7 +124,7 @@ function isCommonVideoAttributesValid (video: any) { isVideoInfoHashValid(video.infoHash) && isVideoNameValid(video.name) && isVideoTagsValid(video.tags) && - isVideoRemoteIdValid(video.remoteId) && + isVideoUUIDValid(video.uuid) && isVideoExtnameValid(video.extname) && isVideoViewsValid(video.views) && isVideoLikesValid(video.likes) && -- cgit v1.2.3