aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/friends.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/friends.ts')
-rw-r--r--server/lib/friends.ts14
1 files changed, 9 insertions, 5 deletions
diff --git a/server/lib/friends.ts b/server/lib/friends.ts
index 3487addbe..4d56e9eb2 100644
--- a/server/lib/friends.ts
+++ b/server/lib/friends.ts
@@ -34,7 +34,11 @@ import {
34import { 34import {
35 RequestEndpoint, 35 RequestEndpoint,
36 RequestVideoEventType, 36 RequestVideoEventType,
37 RequestVideoQaduType 37 RequestVideoQaduType,
38 RemoteVideoCreateData,
39 RemoteVideoUpdateData,
40 RemoteVideoRemoveData,
41 RemoteVideoReportAbuseData
38} from '../../shared' 42} from '../../shared'
39 43
40type QaduParam = { videoId: string, type: RequestVideoQaduType } 44type QaduParam = { videoId: string, type: RequestVideoQaduType }
@@ -52,7 +56,7 @@ function activateSchedulers () {
52 requestVideoEventScheduler.activate() 56 requestVideoEventScheduler.activate()
53} 57}
54 58
55function addVideoToFriends (videoData: Object, transaction: Sequelize.Transaction) { 59function addVideoToFriends (videoData: RemoteVideoCreateData, transaction: Sequelize.Transaction) {
56 const options = { 60 const options = {
57 type: ENDPOINT_ACTIONS.ADD, 61 type: ENDPOINT_ACTIONS.ADD,
58 endpoint: REQUEST_ENDPOINTS.VIDEOS, 62 endpoint: REQUEST_ENDPOINTS.VIDEOS,
@@ -62,7 +66,7 @@ function addVideoToFriends (videoData: Object, transaction: Sequelize.Transactio
62 return createRequest(options) 66 return createRequest(options)
63} 67}
64 68
65function updateVideoToFriends (videoData: Object, transaction: Sequelize.Transaction) { 69function updateVideoToFriends (videoData: RemoteVideoUpdateData, transaction: Sequelize.Transaction) {
66 const options = { 70 const options = {
67 type: ENDPOINT_ACTIONS.UPDATE, 71 type: ENDPOINT_ACTIONS.UPDATE,
68 endpoint: REQUEST_ENDPOINTS.VIDEOS, 72 endpoint: REQUEST_ENDPOINTS.VIDEOS,
@@ -72,7 +76,7 @@ function updateVideoToFriends (videoData: Object, transaction: Sequelize.Transac
72 return createRequest(options) 76 return createRequest(options)
73} 77}
74 78
75function removeVideoToFriends (videoParams: Object) { 79function removeVideoToFriends (videoParams: RemoteVideoRemoveData) {
76 const options = { 80 const options = {
77 type: ENDPOINT_ACTIONS.REMOVE, 81 type: ENDPOINT_ACTIONS.REMOVE,
78 endpoint: REQUEST_ENDPOINTS.VIDEOS, 82 endpoint: REQUEST_ENDPOINTS.VIDEOS,
@@ -82,7 +86,7 @@ function removeVideoToFriends (videoParams: Object) {
82 return createRequest(options) 86 return createRequest(options)
83} 87}
84 88
85function reportAbuseVideoToFriend (reportData: Object, video: VideoInstance, transaction: Sequelize.Transaction) { 89function reportAbuseVideoToFriend (reportData: RemoteVideoReportAbuseData, video: VideoInstance, transaction: Sequelize.Transaction) {
86 const options = { 90 const options = {
87 type: ENDPOINT_ACTIONS.REPORT_ABUSE, 91 type: ENDPOINT_ACTIONS.REPORT_ABUSE,
88 endpoint: REQUEST_ENDPOINTS.VIDEOS, 92 endpoint: REQUEST_ENDPOINTS.VIDEOS,