aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video.js
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/models/video.js
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/models/video.js')
-rw-r--r--server/models/video.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/video.js b/server/models/video.js
index daa273845..fb46aca86 100644
--- a/server/models/video.js
+++ b/server/models/video.js
@@ -380,7 +380,8 @@ function toAddRemoteJSON (callback) {
380 tags: map(self.Tags, 'name'), 380 tags: map(self.Tags, 'name'),
381 createdAt: self.createdAt, 381 createdAt: self.createdAt,
382 updatedAt: self.updatedAt, 382 updatedAt: self.updatedAt,
383 extname: self.extname 383 extname: self.extname,
384 views: self.views
384 } 385 }
385 386
386 return callback(null, remoteVideo) 387 return callback(null, remoteVideo)
@@ -398,7 +399,8 @@ function toUpdateRemoteJSON (callback) {
398 tags: map(this.Tags, 'name'), 399 tags: map(this.Tags, 'name'),
399 createdAt: this.createdAt, 400 createdAt: this.createdAt,
400 updatedAt: this.updatedAt, 401 updatedAt: this.updatedAt,
401 extname: this.extname 402 extname: this.extname,
403 views: this.views
402 } 404 }
403 405
404 return json 406 return json