Fix views processing hour 0

pull/3538/head
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) {
if (!hour) hour = new Date().getHours()
if (hour === undefined || hour === null) hour = new Date().getHours()
return `video-view-${videoId}-h${hour}`
}