mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-02 20:26:36 +08:00
处理无法播放的问题
处理无法播放的问题
This commit is contained in:
@@ -26,9 +26,9 @@ func statsUserHandler(svc *service.Container) gin.HandlerFunc {
|
||||
_ = svc.Repo.DB.Model(&model.PlaybackHistory{}).
|
||||
Where("user_id = ?", uid).Count(&total).Error
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"user_id": uid,
|
||||
"watched_ms": watched,
|
||||
"plays": total,
|
||||
"user_id": uid,
|
||||
"watched_ms": watched,
|
||||
"plays": total,
|
||||
"watched_hours": float64(watched) / 1000.0 / 3600.0,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user