}
function addVideoToFriends (video) {
- createRequest('add', video)
+ createRequest('add', constants.REQUEST_ENDPOINTS.VIDEOS, video)
}
function hasFriends (callback) {
}
function removeVideoToFriends (videoParams) {
- createRequest('remove', videoParams)
+ createRequest('remove', constants.REQUEST_ENDPOINTS.VIDEOS, videoParams)
}
function sendOwnedVideosToPod (podId) {
return
}
- createRequest('add', remoteVideo, [ podId ])
+ createRequest('add', constants.REQUEST_ENDPOINTS.VIDEOS, remoteVideo, [ podId ])
})
})
})
})
}
-function createRequest (type, data, to) {
+function createRequest (type, endpoint, data, to) {
const req = new Request({
+ endpoint,
request: {
type: type,
data: data