mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 07:13:21 +08:00
Merge pull request #15916 from peppy/dont-send-unnecessary-params-beatmap-get
Avoid sending empty parameters in `GetBeatmapRequest`
This commit is contained in:
commit
637852a2aa
@ -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