fix: 修复 BeatLeader 最近成绩获取的 JSON 解析逻辑

This commit is contained in:
lixiangwuxian 2025-03-08 19:28:56 +08:00
parent bfac7dfa59
commit 24aa3dd71a

View File

@ -332,11 +332,14 @@ func (bl *blQuery) GetRecentScores(count int, qqId string) ([]RecordDataLite, er
if err != nil {
return nil, err
}
var scores []ScoreData
err = json.Unmarshal(body, &scores)
var response struct {
Data []ScoreData `json:"data"`
}
err = json.Unmarshal(body, &response)
if err != nil {
return nil, err
}
scores := response.Data
records := make([]RecordDataLite, 0)
for _, score := range scores {
dataLite := RecordDataLite{