aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorLucas Declercq <lucas.declercq@ineat-conseil.fr>2018-10-08 14:45:22 +0200
committerLucas Declercq <lucas.declercq@ineat-conseil.fr>2018-10-08 14:45:22 +0200
commit7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70 (patch)
tree8042222877ed6dc983ff0e13ea3ec56aa1a4386a /server/helpers
parent4ffdcfc63b8c804a0aea20609544c859ab57318b (diff)
downloadPeerTube-7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70.tar.gz
PeerTube-7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70.tar.zst
PeerTube-7f2cfe3a792856f7de6f1d13688aa3d06ec1bf70.zip
Rename downloadingEnabled property to downloadEnabled
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/activitypub.ts2
-rw-r--r--server/helpers/audit-logger.ts2
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts4
3 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts
index 7f903e486..2469b37b1 100644
--- a/server/helpers/activitypub.ts
+++ b/server/helpers/activitypub.ts
@@ -28,7 +28,7 @@ function activityPubContextify <T> (data: T) {
28 size: 'schema:Number', 28 size: 'schema:Number',
29 fps: 'schema:Number', 29 fps: 'schema:Number',
30 commentsEnabled: 'schema:Boolean', 30 commentsEnabled: 'schema:Boolean',
31 downloadingEnabled: 'schema:Boolean', 31 downloadEnabled: 'schema:Boolean',
32 waitTranscoding: 'schema:Boolean', 32 waitTranscoding: 'schema:Boolean',
33 expires: 'schema:expires', 33 expires: 'schema:expires',
34 support: 'schema:Text', 34 support: 'schema:Text',
diff --git a/server/helpers/audit-logger.ts b/server/helpers/audit-logger.ts
index d2c9aee01..a121f0b8a 100644
--- a/server/helpers/audit-logger.ts
+++ b/server/helpers/audit-logger.ts
@@ -118,7 +118,7 @@ const videoKeysToKeep = [
118 'channel-name', 118 'channel-name',
119 'support', 119 'support',
120 'commentsEnabled', 120 'commentsEnabled',
121 'downloadingEnabled' 121 'downloadEnabled'
122] 122]
123class VideoAuditView extends EntityAuditView { 123class VideoAuditView extends EntityAuditView {
124 constructor (private video: VideoDetails) { 124 constructor (private video: VideoDetails) {
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index 59964f91a..5015c59dd 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -56,7 +56,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
56 // Default attributes 56 // Default attributes
57 if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED 57 if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED
58 if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false 58 if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false
59 if (!isBooleanValid(video.downloadingEnabled)) video.downloadingEnabled = true 59 if (!isBooleanValid(video.downloadEnabled)) video.downloadEnabled = true
60 60
61 return isActivityPubUrlValid(video.id) && 61 return isActivityPubUrlValid(video.id) &&
62 isVideoNameValid(video.name) && 62 isVideoNameValid(video.name) &&
@@ -68,7 +68,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
68 isVideoViewsValid(video.views) && 68 isVideoViewsValid(video.views) &&
69 isBooleanValid(video.sensitive) && 69 isBooleanValid(video.sensitive) &&
70 isBooleanValid(video.commentsEnabled) && 70 isBooleanValid(video.commentsEnabled) &&
71 isBooleanValid(video.downloadingEnabled) && 71 isBooleanValid(video.downloadEnabled) &&
72 isDateValid(video.published) && 72 isDateValid(video.published) &&
73 isDateValid(video.updated) && 73 isDateValid(video.updated) &&
74 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) && 74 (!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) &&