aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-04 11:00:59 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-03-04 11:00:59 +0100
commite3d156b341ec1f834d119bfc1b15df6ef9fda737 (patch)
treef7f993fe89e2c440fd52662d6d2a0bbab321c169 /server/controllers/api
parent1f5bf9ef70e2e1e78e3b8f213def26dde7748b89 (diff)
downloadPeerTube-e3d156b341ec1f834d119bfc1b15df6ef9fda737.tar.gz
PeerTube-e3d156b341ec1f834d119bfc1b15df6ef9fda737.tar.zst
PeerTube-e3d156b341ec1f834d119bfc1b15df6ef9fda737.zip
Server: add views attribute when sending videos to friends
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/videos.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/api/videos.js b/server/controllers/api/videos.js
index dfd8699e6..5a67d1121 100644
--- a/server/controllers/api/videos.js
+++ b/server/controllers/api/videos.js
@@ -155,7 +155,8 @@ function addVideo (req, res, videoFile, finalCallback) {
155 extname: path.extname(videoFile.filename), 155 extname: path.extname(videoFile.filename),
156 description: videoInfos.description, 156 description: videoInfos.description,
157 duration: videoFile.duration, 157 duration: videoFile.duration,
158 authorId: author.id 158 authorId: author.id,
159 views: videoInfos.views
159 } 160 }
160 161
161 const video = db.Video.build(videoData) 162 const video = db.Video.build(videoData)