Fix views processing hour 0
This commit is contained in:
parent
1227fe070e
commit
cc49be3e35
1 changed files with 1 additions and 1 deletions
|
@ -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}`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue