mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-29 01:09:20 +00:00
Narrow some types from object to JsonObject in C# models
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Spacebar.Models.Generic;
|
||||
@@ -21,10 +22,10 @@ public class Member
|
||||
public string? Avatar { get; set; }
|
||||
|
||||
[JsonPropertyName("avatar_decoration_data")]
|
||||
public object? AvatarDecorationData { get; set; }
|
||||
public JsonObject? AvatarDecorationData { get; set; }
|
||||
|
||||
[JsonPropertyName("collectibles")]
|
||||
public object? Collectibles { get; set; }
|
||||
public JsonObject? Collectibles { get; set; }
|
||||
|
||||
[JsonPropertyName("display_name_styles"), JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public DisplayNameStyle? DisplayNameStyles { get; set; }
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Diagnostics;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Spacebar.Models.Generic;
|
||||
@@ -23,16 +24,16 @@ public class PartialUser
|
||||
public string? Avatar { get; set; }
|
||||
|
||||
[JsonPropertyName("avatar_decoration_data")]
|
||||
public object? AvatarDecorationData { get; set; }
|
||||
public JsonObject? AvatarDecorationData { get; set; }
|
||||
|
||||
[JsonPropertyName("collectibles")]
|
||||
public object? Collectibles { get; set; }
|
||||
public JsonObject? Collectibles { get; set; }
|
||||
|
||||
[JsonPropertyName("display_name_styles"), JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public DisplayNameStyle? DisplayNameStyles { get; set; }
|
||||
|
||||
[JsonPropertyName("primary_guild")]
|
||||
public object? PrimaryGuild { get; set; }
|
||||
public JsonObject? PrimaryGuild { get; set; }
|
||||
|
||||
[JsonPropertyName("bot")]
|
||||
public bool? Bot { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user