diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/friends.ts | 16 | ||||
-rw-r--r-- | server/lib/request/request-scheduler.ts | 3 | ||||
-rw-r--r-- | server/lib/request/request-video-event-scheduler.ts | 3 | ||||
-rw-r--r-- | server/lib/request/request-video-qadu-scheduler.ts | 3 |
4 files changed, 18 insertions, 7 deletions
diff --git a/server/lib/friends.ts b/server/lib/friends.ts index e097f9254..d07433a5d 100644 --- a/server/lib/friends.ts +++ b/server/lib/friends.ts | |||
@@ -28,10 +28,18 @@ import { | |||
28 | RequestVideoEventScheduler, | 28 | RequestVideoEventScheduler, |
29 | RequestVideoEventSchedulerOptions | 29 | RequestVideoEventSchedulerOptions |
30 | } from './request' | 30 | } from './request' |
31 | import { PodInstance, VideoInstance } from '../models' | 31 | import { |
32 | PodInstance, | ||
33 | VideoInstance | ||
34 | } from '../models' | ||
35 | import { | ||
36 | RequestEndpoint, | ||
37 | RequestVideoEventType, | ||
38 | RequestVideoQaduType | ||
39 | } from '../../shared' | ||
32 | 40 | ||
33 | type QaduParam = { videoId: string, type: string } | 41 | type QaduParam = { videoId: string, type: RequestVideoQaduType } |
34 | type EventParam = { videoId: string, type: string } | 42 | type EventParam = { videoId: string, type: RequestVideoEventType } |
35 | 43 | ||
36 | const ENDPOINT_ACTIONS = REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] | 44 | const ENDPOINT_ACTIONS = REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] |
37 | 45 | ||
@@ -391,7 +399,7 @@ function makeRequestsToWinningPods (cert: string, podsList: PodInstance[], callb | |||
391 | // Wrapper that populate "toIds" argument with all our friends if it is not specified | 399 | // Wrapper that populate "toIds" argument with all our friends if it is not specified |
392 | type CreateRequestOptions = { | 400 | type CreateRequestOptions = { |
393 | type: string | 401 | type: string |
394 | endpoint: string | 402 | endpoint: RequestEndpoint |
395 | data: Object | 403 | data: Object |
396 | toIds?: number[] | 404 | toIds?: number[] |
397 | transaction: Sequelize.Transaction | 405 | transaction: Sequelize.Transaction |
diff --git a/server/lib/request/request-scheduler.ts b/server/lib/request/request-scheduler.ts index 38c0cca3d..575e0227c 100644 --- a/server/lib/request/request-scheduler.ts +++ b/server/lib/request/request-scheduler.ts | |||
@@ -7,10 +7,11 @@ import { | |||
7 | REQUESTS_LIMIT_PODS, | 7 | REQUESTS_LIMIT_PODS, |
8 | REQUESTS_LIMIT_PER_POD | 8 | REQUESTS_LIMIT_PER_POD |
9 | } from '../../initializers' | 9 | } from '../../initializers' |
10 | import { RequestEndpoint } from '../../../shared' | ||
10 | 11 | ||
11 | export type RequestSchedulerOptions = { | 12 | export type RequestSchedulerOptions = { |
12 | type: string | 13 | type: string |
13 | endpoint: string | 14 | endpoint: RequestEndpoint |
14 | data: Object | 15 | data: Object |
15 | toIds: number[] | 16 | toIds: number[] |
16 | transaction: Sequelize.Transaction | 17 | transaction: Sequelize.Transaction |
diff --git a/server/lib/request/request-video-event-scheduler.ts b/server/lib/request/request-video-event-scheduler.ts index c9d165117..4bb76f4c9 100644 --- a/server/lib/request/request-video-event-scheduler.ts +++ b/server/lib/request/request-video-event-scheduler.ts | |||
@@ -7,9 +7,10 @@ import { | |||
7 | REQUESTS_VIDEO_EVENT_LIMIT_PER_POD, | 7 | REQUESTS_VIDEO_EVENT_LIMIT_PER_POD, |
8 | REQUEST_VIDEO_EVENT_ENDPOINT | 8 | REQUEST_VIDEO_EVENT_ENDPOINT |
9 | } from '../../initializers' | 9 | } from '../../initializers' |
10 | import { RequestVideoEventType } from '../../../shared' | ||
10 | 11 | ||
11 | export type RequestVideoEventSchedulerOptions = { | 12 | export type RequestVideoEventSchedulerOptions = { |
12 | type: string | 13 | type: RequestVideoEventType |
13 | videoId: string | 14 | videoId: string |
14 | count?: number | 15 | count?: number |
15 | transaction?: Sequelize.Transaction | 16 | transaction?: Sequelize.Transaction |
diff --git a/server/lib/request/request-video-qadu-scheduler.ts b/server/lib/request/request-video-qadu-scheduler.ts index 49970a2e6..d7169cc81 100644 --- a/server/lib/request/request-video-qadu-scheduler.ts +++ b/server/lib/request/request-video-qadu-scheduler.ts | |||
@@ -9,9 +9,10 @@ import { | |||
9 | REQUEST_VIDEO_QADU_ENDPOINT, | 9 | REQUEST_VIDEO_QADU_ENDPOINT, |
10 | REQUEST_VIDEO_QADU_TYPES | 10 | REQUEST_VIDEO_QADU_TYPES |
11 | } from '../../initializers' | 11 | } from '../../initializers' |
12 | import { RequestVideoQaduType } from '../../../shared' | ||
12 | 13 | ||
13 | export type RequestVideoQaduSchedulerOptions = { | 14 | export type RequestVideoQaduSchedulerOptions = { |
14 | type: string | 15 | type: RequestVideoQaduType |
15 | videoId: string | 16 | videoId: string |
16 | transaction?: Sequelize.Transaction | 17 | transaction?: Sequelize.Transaction |
17 | } | 18 | } |