aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/friends.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/lib/friends.js b/server/lib/friends.js
index ad9e4fdae..589b79660 100644
--- a/server/lib/friends.js
+++ b/server/lib/friends.js
@@ -14,6 +14,7 @@ const requests = require('../helpers/requests')
14 14
15const friends = { 15const friends = {
16 addVideoToFriends, 16 addVideoToFriends,
17 updateVideoToFriends,
17 hasFriends, 18 hasFriends,
18 getMyCertificate, 19 getMyCertificate,
19 makeFriends, 20 makeFriends,
@@ -26,6 +27,10 @@ function addVideoToFriends (video) {
26 createRequest('add', constants.REQUEST_ENDPOINTS.VIDEOS, video) 27 createRequest('add', constants.REQUEST_ENDPOINTS.VIDEOS, video)
27} 28}
28 29
30function updateVideoToFriends (video) {
31 createRequest('update', constants.REQUEST_ENDPOINTS.VIDEOS, video)
32}
33
29function hasFriends (callback) { 34function hasFriends (callback) {
30 db.Pod.countAll(function (err, count) { 35 db.Pod.countAll(function (err, count) {
31 if (err) return callback(err) 36 if (err) return callback(err)
@@ -127,7 +132,7 @@ function sendOwnedVideosToPod (podId) {
127 } 132 }
128 133
129 videosList.forEach(function (video) { 134 videosList.forEach(function (video) {
130 video.toRemoteJSON(function (err, remoteVideo) { 135 video.toAddRemoteJSON(function (err, remoteVideo) {
131 if (err) { 136 if (err) {
132 logger.error('Cannot convert video to remote.', { error: err }) 137 logger.error('Cannot convert video to remote.', { error: err })
133 // Don't break the process 138 // Don't break the process