From 65e35a6122853e7c6b09048a0d6acb0a5ca0c8fd Mon Sep 17 00:00:00 2001 From: LumaLivy Date: Tue, 2 Nov 2021 19:57:33 -0400 Subject: [PATCH] Use JsonPropertyName attribute to comply with C# naming styles --- ProjectLighthouse/Controllers/UserController.cs | 2 +- ProjectLighthouse/Types/Profiles/Pins.cs | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ProjectLighthouse/Controllers/UserController.cs b/ProjectLighthouse/Controllers/UserController.cs index 3a5b86f2..1dc7ecb0 100644 --- a/ProjectLighthouse/Controllers/UserController.cs +++ b/ProjectLighthouse/Controllers/UserController.cs @@ -143,7 +143,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers // Sometimes the update gets called periodically as pin progress updates via playing, // may not affect equipped profile pins however, so check before setting it. string currentPins = user.Pins; - string newPins = string.Join(",", pinJson.profile_pins); + string newPins = string.Join(",", pinJson.ProfilePins); if (!String.Equals(currentPins,newPins)) { user.Pins = newPins; await this.database.SaveChangesAsync(); diff --git a/ProjectLighthouse/Types/Profiles/Pins.cs b/ProjectLighthouse/Types/Profiles/Pins.cs index eedaaebe..101ebf94 100644 --- a/ProjectLighthouse/Types/Profiles/Pins.cs +++ b/ProjectLighthouse/Types/Profiles/Pins.cs @@ -1,12 +1,14 @@ -using LBPUnion.ProjectLighthouse.Serialization; - +using System.Text.Json.Serialization; namespace LBPUnion.ProjectLighthouse.Types.Profiles { public class Pins { - public long[] progress { get; set; } - public long[] awards { get; set; } - public long[] profile_pins { get; set; } + [JsonPropertyName("progress")] + public long[] Progress { get; set; } + [JsonPropertyName("awards")] + public long[] Awards { get; set; } + [JsonPropertyName("profile_pins")] + public long[] ProfilePins { get; set; } } }