diff options
Diffstat (limited to 'server/lib/friends.js')
-rw-r--r-- | server/lib/friends.js | 7 |
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 | ||
15 | const friends = { | 15 | const 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 | ||
30 | function updateVideoToFriends (video) { | ||
31 | createRequest('update', constants.REQUEST_ENDPOINTS.VIDEOS, video) | ||
32 | } | ||
33 | |||
29 | function hasFriends (callback) { | 34 | function 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 |