1
0
Fork 0

Fix views processing hour 0

This commit is contained in:
Chocobozzz 2020-12-30 14:29:17 +01:00
parent 1227fe070e
commit cc49be3e35
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ class Redis {
} }
private generateVideoViewKey (videoId: number, hour?: number) { private generateVideoViewKey (videoId: number, hour?: number) {
if (!hour) hour = new Date().getHours() if (hour === undefined || hour === null) hour = new Date().getHours()
return `video-view-${videoId}-h${hour}` return `video-view-${videoId}-h${hour}`
} }