aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/friends.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/friends.js')
-rw-r--r--server/lib/friends.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/lib/friends.js b/server/lib/friends.js
index 3f100545c..eafffaab0 100644
--- a/server/lib/friends.js
+++ b/server/lib/friends.js
@@ -28,7 +28,7 @@ const friends = {
28} 28}
29 29
30function addVideoToFriends (video) { 30function addVideoToFriends (video) {
31 createRequest('add', video) 31 createRequest('add', constants.REQUEST_ENDPOINTS.VIDEOS, video)
32} 32}
33 33
34function hasFriends (callback) { 34function hasFriends (callback) {
@@ -119,7 +119,7 @@ function quitFriends (callback) {
119} 119}
120 120
121function removeVideoToFriends (videoParams) { 121function removeVideoToFriends (videoParams) {
122 createRequest('remove', videoParams) 122 createRequest('remove', constants.REQUEST_ENDPOINTS.VIDEOS, videoParams)
123} 123}
124 124
125function sendOwnedVideosToPod (podId) { 125function sendOwnedVideosToPod (podId) {
@@ -137,7 +137,7 @@ function sendOwnedVideosToPod (podId) {
137 return 137 return
138 } 138 }
139 139
140 createRequest('add', remoteVideo, [ podId ]) 140 createRequest('add', constants.REQUEST_ENDPOINTS.VIDEOS, remoteVideo, [ podId ])
141 }) 141 })
142 }) 142 })
143 }) 143 })
@@ -250,8 +250,9 @@ function makeRequestsToWinningPods (cert, podsList, callback) {
250 }) 250 })
251} 251}
252 252
253function createRequest (type, data, to) { 253function createRequest (type, endpoint, data, to) {
254 const req = new Request({ 254 const req = new Request({
255 endpoint,
255 request: { 256 request: {
256 type: type, 257 type: type,
257 data: data 258 data: data