aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/friends.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-10 22:24:42 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-10 22:24:42 +0100
commitbd14d16a29e2f90805d04b48378188517741a071 (patch)
tree226dc461367418321d4a77bb5004d1491681f7cf /server/lib/friends.js
parented04d94f6d7132055f97a2f757b85c03c5f2a0b6 (diff)
downloadPeerTube-bd14d16a29e2f90805d04b48378188517741a071.tar.gz
PeerTube-bd14d16a29e2f90805d04b48378188517741a071.tar.zst
PeerTube-bd14d16a29e2f90805d04b48378188517741a071.zip
Server: improve requests scheduler
Diffstat (limited to 'server/lib/friends.js')
-rw-r--r--server/lib/friends.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/server/lib/friends.js b/server/lib/friends.js
index 3d3d0fdee..f0575ff2f 100644
--- a/server/lib/friends.js
+++ b/server/lib/friends.js
@@ -54,7 +54,13 @@ function removeVideoToFriends (videoParams) {
54} 54}
55 55
56function reportAbuseVideoToFriend (reportData, video) { 56function reportAbuseVideoToFriend (reportData, video) {
57 createRequest('report-abuse', constants.REQUEST_ENDPOINTS.VIDEOS, reportData, [ video.Author.podId ]) 57 const options = {
58 type: 'report-abuse',
59 endpoint: constants.REQUEST_ENDPOINTS.VIDEOS,
60 data: reportData,
61 toIds: [ video.Author.podId ]
62 }
63 createRequest(options)
58} 64}
59 65
60function hasFriends (callback) { 66function hasFriends (callback) {
@@ -161,7 +167,13 @@ function sendOwnedVideosToPod (podId) {
161 return 167 return
162 } 168 }
163 169
164 createRequest('add', constants.REQUEST_ENDPOINTS.VIDEOS, remoteVideo, [ podId ]) 170 const options = {
171 type: 'add',
172 endpoint: constants.REQUEST_ENDPOINTS.VIDEOS,
173 data: remoteVideo,
174 toIds: [ podId ]
175 }
176 createRequest(options)
165 }) 177 })
166 }) 178 })
167 }) 179 })