Use JsonPropertyName attribute to comply with C# naming styles

This commit is contained in:
LumaLivy 2021-11-02 19:57:33 -04:00
parent de9c0eecd8
commit 65e35a6122
2 changed files with 8 additions and 6 deletions

View file

@ -143,7 +143,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers
// Sometimes the update gets called periodically as pin progress updates via playing, // Sometimes the update gets called periodically as pin progress updates via playing,
// may not affect equipped profile pins however, so check before setting it. // may not affect equipped profile pins however, so check before setting it.
string currentPins = user.Pins; string currentPins = user.Pins;
string newPins = string.Join(",", pinJson.profile_pins); string newPins = string.Join(",", pinJson.ProfilePins);
if (!String.Equals(currentPins,newPins)) { if (!String.Equals(currentPins,newPins)) {
user.Pins = newPins; user.Pins = newPins;
await this.database.SaveChangesAsync(); await this.database.SaveChangesAsync();

View file

@ -1,12 +1,14 @@
using LBPUnion.ProjectLighthouse.Serialization; using System.Text.Json.Serialization;
namespace LBPUnion.ProjectLighthouse.Types.Profiles namespace LBPUnion.ProjectLighthouse.Types.Profiles
{ {
public class Pins public class Pins
{ {
public long[] progress { get; set; } [JsonPropertyName("progress")]
public long[] awards { get; set; } public long[] Progress { get; set; }
public long[] profile_pins { get; set; } [JsonPropertyName("awards")]
public long[] Awards { get; set; }
[JsonPropertyName("profile_pins")]
public long[] ProfilePins { get; set; }
} }
} }