Enable nullability in Content.Server (#3685)
This commit is contained in:
@@ -87,7 +87,7 @@ namespace Content.Server
|
||||
return true;
|
||||
}
|
||||
|
||||
OOCPostMessage message = null;
|
||||
OOCPostMessage? message = null;
|
||||
try
|
||||
{
|
||||
message = context.RequestBodyJson<OOCPostMessage>();
|
||||
@@ -119,30 +119,30 @@ namespace Content.Server
|
||||
[JsonObject(MemberSerialization.Fields)]
|
||||
private class MoMMIMessageBase
|
||||
{
|
||||
[JsonProperty("password")] public string Password;
|
||||
[JsonProperty("password")] public string Password = null!;
|
||||
|
||||
[JsonProperty("type")] public string Type;
|
||||
[JsonProperty("type")] public string Type = null!;
|
||||
|
||||
[JsonProperty("contents")] public object Contents;
|
||||
[JsonProperty("contents")] public object Contents = null!;
|
||||
}
|
||||
|
||||
[JsonObject(MemberSerialization.Fields)]
|
||||
private class MoMMIMessageOOC
|
||||
{
|
||||
[JsonProperty("sender")] public string Sender;
|
||||
[JsonProperty("sender")] public string Sender = null!;
|
||||
|
||||
[JsonProperty("contents")] public string Contents;
|
||||
[JsonProperty("contents")] public string Contents = null!;
|
||||
}
|
||||
|
||||
[JsonObject(MemberSerialization.Fields, ItemRequired = Required.Always)]
|
||||
private class OOCPostMessage
|
||||
{
|
||||
#pragma warning disable CS0649
|
||||
[JsonProperty("password")] public string Password;
|
||||
[JsonProperty("password")] public string Password = null!;
|
||||
|
||||
[JsonProperty("sender")] public string Sender;
|
||||
[JsonProperty("sender")] public string Sender = null!;
|
||||
|
||||
[JsonProperty("contents")] public string Contents;
|
||||
[JsonProperty("contents")] public string Contents = null!;
|
||||
#pragma warning restore CS0649
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user