From aa2ce188d102ab38452df316d06286040b5d9075 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Jun 2022 14:34:37 +0200 Subject: Optimize view endpoint --- server/lib/views/shared/video-viewer-stats.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/lib/views/shared/video-viewer-stats.ts') diff --git a/server/lib/views/shared/video-viewer-stats.ts b/server/lib/views/shared/video-viewer-stats.ts index a9ba25b47..a56c20559 100644 --- a/server/lib/views/shared/video-viewer-stats.ts +++ b/server/lib/views/shared/video-viewer-stats.ts @@ -10,7 +10,7 @@ import { Redis } from '@server/lib/redis' import { VideoModel } from '@server/models/video/video' import { LocalVideoViewerModel } from '@server/models/view/local-video-viewer' import { LocalVideoViewerWatchSectionModel } from '@server/models/view/local-video-viewer-watch-section' -import { MVideo } from '@server/types/models' +import { MVideo, MVideoImmutable } from '@server/types/models' import { VideoViewEvent } from '@shared/models' const lTags = loggerTagsFactory('views') @@ -41,7 +41,7 @@ export class VideoViewerStats { // --------------------------------------------------------------------------- async addLocalViewer (options: { - video: MVideo + video: MVideoImmutable currentTime: number ip: string viewEvent?: VideoViewEvent @@ -64,7 +64,7 @@ export class VideoViewerStats { // --------------------------------------------------------------------------- private async updateLocalViewerStats (options: { - video: MVideo + video: MVideoImmutable ip: string currentTime: number viewEvent?: VideoViewEvent -- cgit v1.2.3