mirror of
https://github.com/osukey/osukey.git
synced 2025-04-29 02:37:25 +09:00
Fix non-block namespace
This commit is contained in:
parent
4f55afb60d
commit
b28d7b1a92
@ -5,33 +5,34 @@ using System.Net.Http;
|
|||||||
using osu.Framework.IO.Network;
|
using osu.Framework.IO.Network;
|
||||||
using osu.Game.Overlays.Chat;
|
using osu.Game.Overlays.Chat;
|
||||||
|
|
||||||
namespace osu.Game.Online.API.Requests;
|
namespace osu.Game.Online.API.Requests
|
||||||
|
|
||||||
public class ChatReportRequest : APIRequest
|
|
||||||
{
|
{
|
||||||
public readonly long? MessageId;
|
public class ChatReportRequest : APIRequest
|
||||||
public readonly ChatReportReason Reason;
|
|
||||||
public readonly string Comment;
|
|
||||||
|
|
||||||
public ChatReportRequest(long? id, ChatReportReason reason, string comment)
|
|
||||||
{
|
{
|
||||||
MessageId = id;
|
public readonly long? MessageId;
|
||||||
Reason = reason;
|
public readonly ChatReportReason Reason;
|
||||||
Comment = comment;
|
public readonly string Comment;
|
||||||
|
|
||||||
|
public ChatReportRequest(long? id, ChatReportReason reason, string comment)
|
||||||
|
{
|
||||||
|
MessageId = id;
|
||||||
|
Reason = reason;
|
||||||
|
Comment = comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override WebRequest CreateWebRequest()
|
||||||
|
{
|
||||||
|
var req = base.CreateWebRequest();
|
||||||
|
req.Method = HttpMethod.Post;
|
||||||
|
|
||||||
|
req.AddParameter(@"reportable_type", @"message");
|
||||||
|
req.AddParameter(@"reportable_id", $"{MessageId}");
|
||||||
|
req.AddParameter(@"reason", Reason.ToString());
|
||||||
|
req.AddParameter(@"comments", Comment);
|
||||||
|
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string Target => @"reports";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override WebRequest CreateWebRequest()
|
|
||||||
{
|
|
||||||
var req = base.CreateWebRequest();
|
|
||||||
req.Method = HttpMethod.Post;
|
|
||||||
|
|
||||||
req.AddParameter(@"reportable_type", @"message");
|
|
||||||
req.AddParameter(@"reportable_id", $"{MessageId}");
|
|
||||||
req.AddParameter(@"reason", Reason.ToString());
|
|
||||||
req.AddParameter(@"comments", Comment);
|
|
||||||
|
|
||||||
return req;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string Target => @"reports";
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user