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

View file

@ -215,7 +215,7 @@ class Redis {
}
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}`
}