From ee9e7b61f59a427208386738057c8eff48fba599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Jun 2017 10:36:18 +0200 Subject: Create types for model enums --- server/lib/friends.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'server/lib/friends.ts') 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 { RequestVideoEventScheduler, RequestVideoEventSchedulerOptions } from './request' -import { PodInstance, VideoInstance } from '../models' +import { + PodInstance, + VideoInstance +} from '../models' +import { + RequestEndpoint, + RequestVideoEventType, + RequestVideoQaduType +} from '../../shared' -type QaduParam = { videoId: string, type: string } -type EventParam = { videoId: string, type: string } +type QaduParam = { videoId: string, type: RequestVideoQaduType } +type EventParam = { videoId: string, type: RequestVideoEventType } const ENDPOINT_ACTIONS = REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] @@ -391,7 +399,7 @@ function makeRequestsToWinningPods (cert: string, podsList: PodInstance[], callb // Wrapper that populate "toIds" argument with all our friends if it is not specified type CreateRequestOptions = { type: string - endpoint: string + endpoint: RequestEndpoint data: Object toIds?: number[] transaction: Sequelize.Transaction -- cgit v1.2.3