From 1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 20 Aug 2019 19:05:31 +0200 Subject: Type toFormattedJSON --- server/models/video/video-format-utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/models/video/video-format-utils.ts') diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 4e7eb5f0c..6aa7c1e3e 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts @@ -16,7 +16,7 @@ import { } from '../../lib/activitypub' import { isArray } from '../../helpers/custom-validators/misc' import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model' -import { MVideo, MVideoAP, MVideoDetails } from '../../typings/models' +import { MVideo, MVideoAP, MVideoFormattable, MVideoFormattableDetails } from '../../typings/models' import { MStreamingPlaylistRedundancies } from '../../typings/models/video/video-streaming-playlist' import { MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' @@ -29,7 +29,7 @@ export type VideoFormattingJSONOptions = { blacklistInfo?: boolean } } -function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormattingJSONOptions): Video { +function videoModelToFormattedJSON (video: MVideoFormattable, options?: VideoFormattingJSONOptions): Video { const userHistory = isArray(video.UserVideoHistories) ? video.UserVideoHistories[0] : undefined const videoObject: Video = { @@ -103,7 +103,7 @@ function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormatting return videoObject } -function videoModelToFormattedDetailsJSON (video: MVideoDetails): VideoDetails { +function videoModelToFormattedDetailsJSON (video: MVideoFormattableDetails): VideoDetails { const formattedJson = video.toFormattedJSON({ additionalAttributes: { scheduledUpdate: true, -- cgit v1.2.3