mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:52:57 +08:00
Fix request failing due to parameters
This commit is contained in:
parent
a001e4aa16
commit
0a43e54dfc
@ -22,13 +22,10 @@ namespace osu.Game.Online.Rooms
|
|||||||
{
|
{
|
||||||
var req = base.CreateWebRequest();
|
var req = base.CreateWebRequest();
|
||||||
req.Method = HttpMethod.Put;
|
req.Method = HttpMethod.Put;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Password))
|
|
||||||
req.AddParameter("password", Password);
|
|
||||||
|
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string Target => $"rooms/{Room.RoomID.Value}/users/{User.Id}";
|
// Todo: Password needs to be specified here rather than via AddParameter() because this is a PUT request. May be a framework bug.
|
||||||
|
protected override string Target => $"rooms/{Room.RoomID.Value}/users/{User.Id}?password={Password}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user