mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 17:32:54 +08:00
Avoid sending empty parameters in GetBeatmapRequest
This commit is contained in:
parent
bd5140cbdf
commit
dad5b06e84
@ -26,9 +26,12 @@ namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
var request = base.CreateWebRequest();
|
||||
|
||||
request.AddParameter(@"id", beatmapInfo.OnlineID.ToString());
|
||||
request.AddParameter(@"checksum", beatmapInfo.MD5Hash);
|
||||
request.AddParameter(@"filename", filename);
|
||||
if (beatmapInfo.OnlineID > 0)
|
||||
request.AddParameter(@"id", beatmapInfo.OnlineID.ToString());
|
||||
if (!string.IsNullOrEmpty(beatmapInfo.MD5Hash))
|
||||
request.AddParameter(@"checksum", beatmapInfo.MD5Hash);
|
||||
if (!string.IsNullOrEmpty(filename))
|
||||
request.AddParameter(@"filename", filename);
|
||||
|
||||
return request;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user