diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 11:52:52 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 11:53:13 +0100 |
commit | fd45e8f43c2638478599ca75632518054461da85 (patch) | |
tree | 01e1fb5ddad53bde8fb2c48f348fb8add51cfdb3 /server/controllers/api/remote/videos.ts | |
parent | b7a485121d71c95fcf5e432e4cc745cf91af4f93 (diff) | |
download | PeerTube-fd45e8f43c2638478599ca75632518054461da85.tar.gz PeerTube-fd45e8f43c2638478599ca75632518054461da85.tar.zst PeerTube-fd45e8f43c2638478599ca75632518054461da85.zip |
Add video privacy setting
Diffstat (limited to 'server/controllers/api/remote/videos.ts')
-rw-r--r-- | server/controllers/api/remote/videos.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/remote/videos.ts b/server/controllers/api/remote/videos.ts index 3ecc62ada..cba47f0a1 100644 --- a/server/controllers/api/remote/videos.ts +++ b/server/controllers/api/remote/videos.ts | |||
@@ -267,7 +267,8 @@ async function addRemoteVideo (videoToCreateData: RemoteVideoCreateData, fromPod | |||
267 | views: videoToCreateData.views, | 267 | views: videoToCreateData.views, |
268 | likes: videoToCreateData.likes, | 268 | likes: videoToCreateData.likes, |
269 | dislikes: videoToCreateData.dislikes, | 269 | dislikes: videoToCreateData.dislikes, |
270 | remote: true | 270 | remote: true, |
271 | privacy: videoToCreateData.privacy | ||
271 | } | 272 | } |
272 | 273 | ||
273 | const video = db.Video.build(videoData) | 274 | const video = db.Video.build(videoData) |
@@ -334,6 +335,7 @@ async function updateRemoteVideo (videoAttributesToUpdate: RemoteVideoUpdateData | |||
334 | videoInstance.set('views', videoAttributesToUpdate.views) | 335 | videoInstance.set('views', videoAttributesToUpdate.views) |
335 | videoInstance.set('likes', videoAttributesToUpdate.likes) | 336 | videoInstance.set('likes', videoAttributesToUpdate.likes) |
336 | videoInstance.set('dislikes', videoAttributesToUpdate.dislikes) | 337 | videoInstance.set('dislikes', videoAttributesToUpdate.dislikes) |
338 | videoInstance.set('privacy', videoAttributesToUpdate.privacy) | ||
337 | 339 | ||
338 | await videoInstance.save(sequelizeOptions) | 340 | await videoInstance.save(sequelizeOptions) |
339 | 341 | ||