aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-30 14:29:17 +0100
committerChocobozzz <me@florianbigard.com>2020-12-30 14:29:17 +0100
commitcc49be3e3547703d00ef7363d664221a39334ca3 (patch)
tree4a7bfc036164b642bb67a4d26c05eb33d2343e13
parent1227fe070e60b41731900c7712454c1409e6c025 (diff)
downloadPeerTube-cc49be3e3547703d00ef7363d664221a39334ca3.tar.gz
PeerTube-cc49be3e3547703d00ef7363d664221a39334ca3.tar.zst
PeerTube-cc49be3e3547703d00ef7363d664221a39334ca3.zip
Fix views processing hour 0
-rw-r--r--server/lib/redis.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/lib/redis.ts b/server/lib/redis.ts
index 4325598b2..257cce141 100644
--- a/server/lib/redis.ts
+++ b/server/lib/redis.ts
@@ -215,7 +215,7 @@ class Redis {
215 } 215 }
216 216
217 private generateVideoViewKey (videoId: number, hour?: number) { 217 private generateVideoViewKey (videoId: number, hour?: number) {
218 if (!hour) hour = new Date().getHours() 218 if (hour === undefined || hour === null) hour = new Date().getHours()
219 219
220 return `video-view-${videoId}-h${hour}` 220 return `video-view-${videoId}-h${hour}`
221 } 221 }