]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos.js
Server: add views attribute when sending videos to friends
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos.js
index dfd8699e6163a73cc4956c127cae45a3f59c38dc..5a67d1121fcb9c3f2f7df73ec548cb422b5e9f42 100644 (file)
@@ -155,7 +155,8 @@ function addVideo (req, res, videoFile, finalCallback) {
         extname: path.extname(videoFile.filename),
         description: videoInfos.description,
         duration: videoFile.duration,
-        authorId: author.id
+        authorId: author.id,
+        views: videoInfos.views
       }
 
       const video = db.Video.build(videoData)