From a2d17709ed37cd7837e9ec262860c03c69dbb9af Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Sat, 8 Mar 2025 21:18:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=9F=E4=B8=80=E5=8D=95=E4=B8=AA?= =?UTF-8?q?=E5=93=88=E5=B8=8C=E6=9F=A5=E8=AF=A2=E7=9A=84=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/beatleader/bind_bl.go | 3 +++ service/scoresaber/bind_ss.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/service/beatleader/bind_bl.go b/service/beatleader/bind_bl.go index 1ed5e9b..4a7ffb2 100644 --- a/service/beatleader/bind_bl.go +++ b/service/beatleader/bind_bl.go @@ -402,6 +402,9 @@ func GetSongIdsByHash(hashs []string) (hashToSongId map[string]string, err error ID string `json:"id"` } err = json.Unmarshal(body, &singleResponse) + response = make(map[string]struct { + ID string `json:"id"` + }) response[batchHashs[0]] = singleResponse } else { err = json.Unmarshal(body, &response) diff --git a/service/scoresaber/bind_ss.go b/service/scoresaber/bind_ss.go index 300af36..f4e13fb 100644 --- a/service/scoresaber/bind_ss.go +++ b/service/scoresaber/bind_ss.go @@ -430,6 +430,9 @@ func GetSongIdsByHash(hashs []string) (hashToSongId map[string]string, err error ID string `json:"id"` } err = json.Unmarshal(body, &singleResponse) + response = make(map[string]struct { + ID string `json:"id"` + }) response[batchHashs[0]] = singleResponse } else { err = json.Unmarshal(body, &response)