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)