diff --git a/service/beatleader/user_info.go b/service/beatleader/user_info.go index 4c73967..c23d904 100644 --- a/service/beatleader/user_info.go +++ b/service/beatleader/user_info.go @@ -69,6 +69,9 @@ func FetchPlayerData(blID string) (*PlayerData, error) { } func FetchCountryLeaderboard(country string, offset int, userId string) ([]PlayerDataLite, error) { + if offset < 1 { + offset = 1 + } url := fmt.Sprintf("https://api.beatleader.com/players?leaderboardContext=general&page=%d&count=50&sortBy=pp&mapsType=ranked&ppType=general&order=desc&countries=%s", offset/50+1, country) // 创建请求