mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-02-12 19:22:45 +00:00
global: add null safety checks
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Streetwriters.Common.Messages
|
||||
public class CreateSubscriptionMessage
|
||||
{
|
||||
[JsonPropertyName("userId")]
|
||||
public string UserId { get; set; }
|
||||
public required string UserId { get; set; }
|
||||
|
||||
[JsonPropertyName("provider")]
|
||||
public SubscriptionProvider Provider { get; set; }
|
||||
@@ -46,19 +46,19 @@ namespace Streetwriters.Common.Messages
|
||||
public long ExpiryTime { get; set; }
|
||||
|
||||
[JsonPropertyName("orderId")]
|
||||
public string OrderId { get; set; }
|
||||
public string? OrderId { get; set; }
|
||||
|
||||
[JsonPropertyName("updateURL")]
|
||||
public string UpdateURL { get; set; }
|
||||
public string? UpdateURL { get; set; }
|
||||
|
||||
[JsonPropertyName("cancelURL")]
|
||||
public string CancelURL { get; set; }
|
||||
public string? CancelURL { get; set; }
|
||||
|
||||
[JsonPropertyName("subscriptionId")]
|
||||
public string SubscriptionId { get; set; }
|
||||
public string? SubscriptionId { get; set; }
|
||||
|
||||
[JsonPropertyName("productId")]
|
||||
public string ProductId { get; set; }
|
||||
public string? ProductId { get; set; }
|
||||
|
||||
[JsonPropertyName("extend")]
|
||||
public bool Extend { get; set; }
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Streetwriters.Common.Messages
|
||||
public class CreateSubscriptionMessageV2
|
||||
{
|
||||
[JsonPropertyName("userId")]
|
||||
public string UserId { get; set; }
|
||||
public required string UserId { get; set; }
|
||||
|
||||
[JsonPropertyName("provider")]
|
||||
public SubscriptionProvider Provider { get; set; }
|
||||
@@ -49,13 +49,13 @@ namespace Streetwriters.Common.Messages
|
||||
public long ExpiryTime { get; set; }
|
||||
|
||||
[JsonPropertyName("orderId")]
|
||||
public string OrderId { get; set; }
|
||||
public string? OrderId { get; set; }
|
||||
|
||||
[JsonPropertyName("subscriptionId")]
|
||||
public string SubscriptionId { get; set; }
|
||||
public string? SubscriptionId { get; set; }
|
||||
|
||||
[JsonPropertyName("productId")]
|
||||
public string ProductId { get; set; }
|
||||
public string? ProductId { get; set; }
|
||||
|
||||
[JsonPropertyName("timestamp")]
|
||||
public long Timestamp { get; set; }
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Streetwriters.Common.Messages
|
||||
public class DeleteSubscriptionMessage
|
||||
{
|
||||
[JsonPropertyName("userId")]
|
||||
public string UserId { get; set; }
|
||||
public required string UserId { get; set; }
|
||||
|
||||
[JsonPropertyName("appId")]
|
||||
public ApplicationType AppId { get; set; }
|
||||
|
||||
@@ -27,6 +27,6 @@ namespace Streetwriters.Common.Messages
|
||||
public class DeleteUserMessage
|
||||
{
|
||||
[JsonPropertyName("userId")]
|
||||
public string UserId { get; set; }
|
||||
public required string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,10 +26,10 @@ namespace Streetwriters.Common.Messages
|
||||
public class Message
|
||||
{
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
public required string Type { get; set; }
|
||||
|
||||
[JsonPropertyName("data")]
|
||||
public string Data { get; set; }
|
||||
public string? Data { get; set; }
|
||||
}
|
||||
public class SendSSEMessage
|
||||
{
|
||||
@@ -37,10 +37,10 @@ namespace Streetwriters.Common.Messages
|
||||
public bool SendToAll { get; set; }
|
||||
|
||||
[JsonPropertyName("userId")]
|
||||
public string UserId { get; set; }
|
||||
public required string UserId { get; set; }
|
||||
|
||||
[JsonPropertyName("message")]
|
||||
public Message Message { get; set; }
|
||||
public required Message Message { get; set; }
|
||||
|
||||
[JsonPropertyName("originTokenId")]
|
||||
public string? OriginTokenId { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user