aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-03-27 22:26:39 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-03-31 10:29:24 +0200
commit714bfcc556177dce2b65a1e58babdf2488e9de13 (patch)
tree35d5d14c03756bc239ce91d52ca9051dd34f80c4 /server/models/video
parent747c562837e37f2fa455e8ef62165e9bb4e365f1 (diff)
downloadPeerTube-714bfcc556177dce2b65a1e58babdf2488e9de13.tar.gz
PeerTube-714bfcc556177dce2b65a1e58babdf2488e9de13.tar.zst
PeerTube-714bfcc556177dce2b65a1e58babdf2488e9de13.zip
Tests for viewsPerDay
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video-channel.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index 5e6541837..78fc3d7e4 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -191,7 +191,7 @@ export type SummaryOptions = {
191 'SELECT days.day AS day, ' + 191 'SELECT days.day AS day, ' +
192 'COALESCE(SUM(views.views), 0) AS views ' + 192 'COALESCE(SUM(views.views), 0) AS views ' +
193 'FROM days ' + 193 'FROM days ' +
194 `LEFT JOIN views ON date_trunc('day', "views"."createdAt") = days.day ` + 194 `LEFT JOIN views ON date_trunc('day', "views"."startDate") = date_trunc('day', days.day) ` +
195 'GROUP BY 1 ' + 195 'GROUP BY 1 ' +
196 'ORDER BY day ' + 196 'ORDER BY day ' +
197 ') t' + 197 ') t' +