Skip to content

Commit

Permalink
update: fixed ENAEA submit studyTime nil BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Changbaiqi committed Nov 26, 2024
1 parent efd3c9d commit 5d78e96
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ func SubmitStudyTimeAction(cache *enaea.EnaeaUserCache, video *EnaeaVideo, time
if gojsonq.New().JSONString(api).Find("success") == false {
return errors.New(gojsonq.New().JSONString(api).Find("message").(string))
}
if gojsonq.New().JSONString(api).Find("progress") != nil {
return errors.New("提交学时时服务器端返回消息异常:" + api)
}
video.StudyProgress = float32(gojsonq.New().JSONString(api).Find("progress").(float64))
//fmt.Println(api)
return nil
}

0 comments on commit 5d78e96

Please sign in to comment.