From f18a060a83d7053897173b2a24fb7984893131c7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 5 May 2022 13:47:51 +0200 Subject: Remove comments, rates and views from stats It prevent us to apply date filters --- server/models/view/local-video-viewer.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'server/models/view/local-video-viewer.ts') diff --git a/server/models/view/local-video-viewer.ts b/server/models/view/local-video-viewer.ts index b6ddcbb57..5928ba5f6 100644 --- a/server/models/view/local-video-viewer.ts +++ b/server/models/view/local-video-viewer.ts @@ -134,9 +134,6 @@ export class LocalVideoViewerModel extends Model(watchPeakQuery, options) - const commentsQuery = `SELECT COUNT(*) AS comments FROM "videoComment" WHERE "videoId" = :videoId` - const commentsPromise = LocalVideoViewerModel.sequelize.query(commentsQuery, options) - const countriesQuery = `SELECT country, COUNT(country) as viewers ` + `FROM "localVideoViewer" ` + `WHERE "videoId" = :videoId AND country IS NOT NULL ` + @@ -144,10 +141,9 @@ export class LocalVideoViewerModel extends Model(countriesQuery, options) - const [ rowsWatchTime, rowsWatchPeak, rowsComment, rowsCountries ] = await Promise.all([ + const [ rowsWatchTime, rowsWatchPeak, rowsCountries ] = await Promise.all([ watchTimePromise, watchPeakPromise, - commentsPromise, countriesPromise ]) @@ -166,14 +162,6 @@ export class LocalVideoViewerModel extends Model ({ isoCode: r.country, viewers: r.viewers -- cgit v1.2.3