aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-15 14:46:26 +0100
committerChocobozzz <me@florianbigard.com>2018-02-15 15:29:07 +0100
commit2422c46b27790d94fd29a7092170cee5a1b56008 (patch)
treed5c1942ce20cadb27a551d87c789edfe92f5b105 /server/controllers/api/videos/index.ts
parent34cbef8c6cc912143a421413bdd832c4adcc556a (diff)
downloadPeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.gz
PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.zst
PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.zip
Implement support field in video and video channel
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 564ccd3f8..c9334676e 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -178,6 +178,7 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi
178 commentsEnabled: videoInfo.commentsEnabled, 178 commentsEnabled: videoInfo.commentsEnabled,
179 nsfw: videoInfo.nsfw, 179 nsfw: videoInfo.nsfw,
180 description: videoInfo.description, 180 description: videoInfo.description,
181 support: videoInfo.support,
181 privacy: videoInfo.privacy, 182 privacy: videoInfo.privacy,
182 duration: videoPhysicalFile['duration'], // duration was added by a previous middleware 183 duration: videoPhysicalFile['duration'], // duration was added by a previous middleware
183 channelId: res.locals.videoChannel.id 184 channelId: res.locals.videoChannel.id
@@ -306,6 +307,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
306 if (videoInfoToUpdate.language !== undefined) videoInstance.set('language', videoInfoToUpdate.language) 307 if (videoInfoToUpdate.language !== undefined) videoInstance.set('language', videoInfoToUpdate.language)
307 if (videoInfoToUpdate.nsfw !== undefined) videoInstance.set('nsfw', videoInfoToUpdate.nsfw) 308 if (videoInfoToUpdate.nsfw !== undefined) videoInstance.set('nsfw', videoInfoToUpdate.nsfw)
308 if (videoInfoToUpdate.privacy !== undefined) videoInstance.set('privacy', parseInt(videoInfoToUpdate.privacy.toString(), 10)) 309 if (videoInfoToUpdate.privacy !== undefined) videoInstance.set('privacy', parseInt(videoInfoToUpdate.privacy.toString(), 10))
310 if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support)
309 if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description) 311 if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description)
310 if (videoInfoToUpdate.commentsEnabled !== undefined) videoInstance.set('commentsEnabled', videoInfoToUpdate.commentsEnabled) 312 if (videoInfoToUpdate.commentsEnabled !== undefined) videoInstance.set('commentsEnabled', videoInfoToUpdate.commentsEnabled)
311 313