1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Server: add nsfw attribute

This commit is contained in:
Chocobozzz 2017-03-28 21:19:46 +02:00
parent d07137b90b
commit 31b59b4774
14 changed files with 154 additions and 2 deletions

View file

@ -313,6 +313,7 @@ function addVideo (req, res, videoFile, finalCallback) {
extname: path.extname(videoFile.filename),
category: videoInfos.category,
licence: videoInfos.licence,
nsfw: videoInfos.nsfw,
description: videoInfos.description,
duration: videoFile.duration,
authorId: author.id
@ -428,6 +429,7 @@ function updateVideo (req, res, finalCallback) {
if (videoInfosToUpdate.name) videoInstance.set('name', videoInfosToUpdate.name)
if (videoInfosToUpdate.category) videoInstance.set('category', videoInfosToUpdate.category)
if (videoInfosToUpdate.licence) videoInstance.set('licence', videoInfosToUpdate.licence)
if (videoInfosToUpdate.nsfw) videoInstance.set('nsfw', videoInfosToUpdate.nsfw)
if (videoInfosToUpdate.description) videoInstance.set('description', videoInfosToUpdate.description)
videoInstance.save(options).asCallback(function (err) {