diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 10:36:18 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 10:36:18 +0200 |
commit | ee9e7b61f59a427208386738057c8eff48fba599 (patch) | |
tree | 9097de886128e15f21f0b5920a2076d16a087467 /server/lib/friends.ts | |
parent | 70c065d64c330196d371941d9294a55da6e3aa37 (diff) | |
download | PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.tar.gz PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.tar.zst PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.zip |
Create types for model enums
Diffstat (limited to 'server/lib/friends.ts')
-rw-r--r-- | server/lib/friends.ts | 16 |
1 files changed, 12 insertions, 4 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 |